Transient lensing from a photoemitted electron gas imaged by ultrafast electron microscopy