Made a bunch of requested changes (I've reverted the "all safe" patch
for now since it caused so much grief; see above).
* quote: Fixed encoding illegal % sequences (and lots of new test cases
to prove it).
* quote now throws a type error if s is bytes, and encoding or errors
supplied.
* A few minor documentation fixes.
Patch 9.
Commit log for patch8 should suffice.