The Impact of Manufacturing Imperfections on the Performance of Metalenses and a Manufacturing-Tolerant Design Method