Polynomial Partitioning on Varieties of Codimension Two and Point-Hypersurface Incidences in Four Dimensions