Loss compensation in metal-dielectric structures in negative-refraction and super-resolving regimes