Volume-preserving algorithms for charged particle dynamics