More pagination cleanups using \needspace and \needlines.