Slightly faster SH basis implementation.

I eliminated some unnecessary sine and cosine calculations, resulting in a slight speed gain.

Using iFOD2 on a software phantom, the current master branch gets me:
gtime tckgen csd/fod10.mif -mask mask.mif -number 100000 -seed_image mask.mif csd/test.tck -force
tckgen [WARNING]: existing output files will be overwritten
  103565 generated,   100000 selected    [100%]
843.04user 1.89system 3:44.91elapsed 375%CPU (0avgtext+0avgdata 263208960maxresident)k
0inputs+22outputs (32major+16220minor)pagefaults 0swaps

whereas with this commit, I get:
gtime tckgen csd/fod10.mif -mask mask.mif -number 100000 -seed_image mask.mif csd/test.tck -force
tckgen [WARNING]: existing output files will be overwritten
  103592 generated,   100000 selected    [100%]
800.80user 2.91system 3:27.70elapsed 386%CPU (0avgtext+0avgdata 263012352maxresident)k
3inputs+22outputs (193major+16043minor)pagefaults 0swaps