A multislit transverse-emittance diagnostic for space-charge-dominated electron beams