Strengthened stream testing

Tidied up the new KLVStream code and strengthened the unit tests.