Try and parse the mock output

Instead of discarding the mock output in our test code, instead write
it to a bytes.Buffer, and then try and parse it.  If the parse fails
then fail the test, but also write the mock output to a file to help
with debugging.  This should help catch cases where we generate broken
code ...
Ignore files generated by test

When we fail to parse mock output we write out the mock data to a
file, we want to ignore those files.
Don't omit private constants

We shouldn't actually need them, but if we exclude them we could mess
up iota blocks.  In particular, some of the Go code initialises iota
blocks with unexported values.
Don't make TODOs unparsable.

If we are going to put TODOs into the generated mock code, then they
should at least be valid Go code.

In particular the TODO in a function literal is only relevant if that
literal is actually called.  So a panic makes more sense.
Fix the way package documentation is printed

The text template package docs were catching us out, as they included
a /* ... */ inside a // comment, and we weren't bothering with the
difference between them ...