Optical-phonon confinement and scattering in wurtzite heterostructures