Various warning fixes redux

[Remaining patches from #55, rebased against current master.]

Compiling with the version of clang that comes with OS X Mavericks produces a number of warnings, many of which pertain to small issues in header files and so are repeated over and over during a full build. These suggested changes fix those in headers and a few others. There is also a small test case fix.

ed64d68d55dd32b1cf57d897869481c025da903c fixes #60.