Allows to use alternative algorithms to solve lyapunov equation
(cherry picked from commit 4e789452b22a0871f48aac82e3efdfa24125cc76)
Speeds up the Kalman smoother
(cherry picked from commit ae72105b5c0cc1cd5121e8c026d9c0bfe40dfc39)