code cleanup & tests passing

- fixed issues in code raised by unit tests
- code cleanup
ref #1239 [Migrate to NDND-TLV]

- added configuration parameter which dictates wire encoding type used
in the library
'issues/1239-TLV-transition' -> 'dev'