Ionization Feedback in Massive Star Formation: Simulating the Formation of Massive Stars and Ultracompact H II Regions with Adaptive-Mesh Radiation Hydrodynamics