Solve: Replaced static transposition dispatch in direct_solve() with runtime flag.

Reduces amount of source code, compilation times (a bit) and simplifies calls to external libraries.