Improve error handling
Improve error handling

Start returning error codes/NULL pointers from the low level
functions, and have the higher level functions handle them.

Start using errno, so any program which accesses huffman() or
unhuffman() can find out what went wrong.

iestynpryce/huffman,iestynpryce/huffman