Intial commit of stuff I've already worked on.

(Yes, some of it is copied from another repository, and I didn't do
this such that the commit history is preserved, but really it's
just too late at night to be figuring that stuff out right now.)