Byte compile warnings

It's been a while. I think I fixed all of the warnings except for the one in expand-region-core.el, which I think I remember is trickier to fix. This is ready to merge! The tests passed on my machine.