cppcheck: upgrade to version 1.66 on travis

Also, fix all warnings that are found by new cppcheck version.