Guaranteeing Conservation Laws with Projection in Physics-Informed Neural Networks