Use return values instead of out parameters

Using normal return values instead of out parameters makes functions
simpler and more natural to use. Due to return value optimization (RVO)
normal return values also shouldn't be any less efficient than out
parameters.

The out parameter might even need a default constructed object that can
otherwise often be avoided:

    Matrix3cd tmp;
	 func(tmp);

When func() simply returns the matrix there is no need to first
construct an empty tmp object:

	 Matrix3cd tmp = func();

This way performance can even increase.

The change is mostly about clearer function interfaces though, so reject it if you feel it makes things less readable.

In some functions it also uses several temporary variables instead of a single one since reusing a old variable with `tmpValue = fun()` always *does* require an actual assignment while creating a new variable like `Matrix3cd tmp2 = fun()` can directly reuse the returned value.