Progress, the list of cppcheck findings is shrinking. Lots of minor performance ...

@azonenberg@ioc.exchange

Progress, the list of cppcheck findings is shrinking. Lots of minor performance tweaks (unnecessary pass by value on stuff not in inner loops) and a few legit but minor bugs.