Much work on getting tracing/tests into shape

* Tracing more sane.  More bugs found in existing console tracing logic :-(
* Tests working better.  More tests needed.  Going to port over more
  test cases from console.
* Still need to test chunked inputs