Enhanced resolution of lossy interferometry by coherent amplification of single photons