Dielectric metasurfaces for complete control of phase and polarization with subwavelength spatial resolution and high transmission