Fix integer serialisation on 32-bit systems

Signed-off-by: Joe Stringer <joestringernz@gmail.com>
TLV: Document int_to_bin

Signed-off-by: Joe Stringer <joestringernz@gmail.com>
Merge pull request #45 from joestringer/32bit

Bugfix & Document TLV