This better matches what one would expect from the hex or base64 (upcoming) formats.
Implement phogen.encode() to encode Bhashes to phogen strings. This commit also adds unit tests for the above function.