Nucleation and cavitation of spherical, cylindrical, and slablike droplets and bubbles in small systems.