Fix current conservation bugs in symmetric modes
This MR implements tests for current conservation, particularly aimed at modes with symmetries and conservation laws, and fixes related bugs. It also fixes a bug in the function to check whether a Hamiltonian possesses a declared discrete symmetry.