Rotate diffusion gradients

based on Guy William's algorithm as implemented by Matthew Brett