Projected Neural Differential Equations for Learning Constrained Dynamics