Phase I of cleaning up is documenting things and moving code around a
bit so it makes a bit more sense as to what goes where. I also removed
the encoding incantation at the top of every source file, which was an
artifact from when CharDB was still based on Twisted and running in
Python 2.7.