Address issue #591

I've attempted to clean up all the issues reported by cpplint.py to address #591.  The vast majority of these changes are formatting-only.  But there are a handful that could modify behavior (sprintf => snprintf comes to mind).

I've built these changes and run the tests on Arch (gcc 4.7.0), Ubuntu 12.04 (gcc 4.6.3), OS X 10.7.4, Solaris 11, and Windows 7.  On all platforms, the test results matched those of running the tests against master (284816ee9f).

I couldn't decide whether to do these as separate commits or as one giant commit.  I went with separate commits, but would be happy to squash them into one if that is preferred.