Changes from PAL Robotics

Here are a few changes that we have on `open_karto` at PAL.

Most of these commits only change little details, and fix cppcheck-related issues.
The following commits actually change the logic:

- 418cdca adds an accessor to switch the scan matcher on/off at runtime
- 3399878 and 978a31a solve problems, but I fail to remember what exactly. @RainCT do you remember?

Since whitespaces & newlines have been touched, the global diff will sadly not be of great help, so individual commits should be inspected instead.