Metalenses at visible wavelengths: Diffraction-limited focusing and subwavelength resolution imaging