Put Transformer objects on the heap.

This should ensure they are correctly aligned for Eigen, so that MSVC
can compile this part of the code.