An improved Phonex and corresponding tests.

While the paper by Lait states step #3 as one atomic action,
the reference implementation handled the H-prefix as a separate
step. Originally I had not accounted for this. I fixed this and
a number of smaller bugs, using Febrl's encode.py to check my
work. Hooray!