Start conversion of all mathematical functions to functors

Had to do this for casting to allow broadcasting over arrays; in turn
to accommodate double complex.  It's the way to go though; it'll allow
proper DFTs with stateful descriptors.