Applications of geometric singular perturbation theory to mechanics: the Painlevé paradox in 3D and related problems