Clean-up of MatrixExponential:
* put internal stuff in the internal namespace
* replace member functions by free functions