Fixed line/column tracking, added tests and

refactored utf8-parsing functions to work on arbitrary pointers