More fixes for Converter and related logic

* Properly handle xml => attr
* Buffer handling improvements
* Transcoder state improvements
* #finish logic
* Fixes for primitive_errinfo
* Modest perf improvements by saving transcoder structures