Added KLV encoder

Added a BER length encoder; added a encodeKLV to encode key and value
buffer pairs into KLVs.
Merge pull request #1 from mjohnsullivan/master

Added KLV encoder