Address most warnings and suggestions from cppcheck

cppcheck did find quite a bit of lint although nothing serious as far as
I could see. A couple of warnings seem to be false positives and/or not
really problems, so I left them alone. We should make a whitelist of these
so we can automate cppcheck tests.

The only bug seemed to be in THaScalerGui::popPlot, where the call to find()
would only be executed during static initialization instead of for each call,
probably rendering the function useless.

I had to run cppcheck on the hana_decode and hana_scaler subdirectories
manually. Also, the unusedFunction, missingInclude and information checks
should probably not be run.