generate loci tests from the test_data files

Reviewer: @andi-bigswitch

Manually constructed testcases are important to ensure we're actually speaking
the standard wire protocol.

A few C sections have been added to the test_data files. I'm going to focus on
of13 tests in a future pull request.