Python 2 and 3 compatibility.

- more compact recoverfragments()
- str in most places, bytes for non-terminals in Grammar objects,
  and required in regexes for mapping labels
- lots of gratuitous encode() and str(foo.decode())

Closes #13