SERVER-13617 remove const qualifiers on primitive return types

These tripped -Wignored-qualifiers on clang. With this change we now compile
cleanly on clang with -Wextra with only the following warnings disabled.
Neither seems worth fixing.

-Wno-unused-parameter
-Wno-missing-field-initializers
SERVER-13617 don't compare pointers to 0 using >

GCC with -Wextra gives the following message in these cases:

ordered comparison of pointer with integer zero