Revert "All frequently called matrix_functions now inline-ed"

This reverts commit 188e756a9c91eca30b4d0e37c20b39aafc2d94a4.