dirgen ported to updated syntax
dirgen ported to updated syntax

Note this is a totally different implementation from the previous one,
due to the lack of any optimisation routines in Eigen. The new approach
uses the humble gradient descent algorithm, and operates on Cartesian
coordinates with a projected update (using the UpdateFunctor
functionality in GradientDescent), instead of using a CG solver on
spherical coordinates. Thankfully, that actually resulted in a ~20-fold
speedup...

MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3