Fix some weird lint found by clang

Small stuff, no behavior change expected.
Pick some low-hanging const fruit

Makes more of the code const-correct; there are still plenty of difficult-to-fix const problems left.
No behavior change expected.