Allow matching() function in Converter to take a function argument.

This makes matching more flexible if you want to match for something other than
tags.
Move BufferWrap::clear() from .hpp into .cpp file and test it.
Add a paranoia check.