Gravitational lensing by black holes and their alternatives