documentation updates for 1.9

a bunch of documentation updates and a set of tests I had lying around in one of my local branches for the 1.9 branch
Well, that's one way to do this ;) I think it would be cleaner to put the documentation in `tobytes` and have `tostring` reference it.