codec: Fixes and clarifications for binc and rpc, in prep for c library.

- binc support for pruned values fixed.
- Added closed flag to rpcCodec, and use buffered reader for tracking custom header.
- Added simple codec - a much simplified version of binc (mostly academic).
- Built c implementation of binc support (for use in c, python, etc).