This required making a whole bunch of other functions in the call chain
take const parameters as well. It also required changing some function
pointers in some types to take const parameters, which in turn required
changing all the functions that are pointed to by those function
pointers to take const parameters as well.
All in all, the non-constness was deep and tangled.
There's still a lot more that we can make const, but I wanted to keep
this change as narrow and focused as possible.