Photoevaporation of Minihalos During Cosmic Reionization: Primordial and Metal-enriched Halos