P3m gpu clean

This fixes a small bug with the non-cubic p3m when specifying only one mesh value. It also fixes a compile error when compiling without CUDA.