parseTestRecord: add support for YAML frontmatter

parseTestRecord: initial unit test for test record parser
parseTestRecord: refactor for testing
factor old parsing; add YAML parsing