Fix a few warnings seen with the clang static analysis tool.
Fix a few more problems found with scan-build and clang 3.4 on OS X.
Add support for the 3 program info items added in protocol 76.
Merge remote-tracking branch 'cmyth/master'