Add yaml output options on the scores, add tests.

This involves re-arranging how the outputs are generated a little,
but is useful as the yaml outputs will be machine readable, and will
thus allow other tooling to use the data in clever ways. The tests
aren't complete yet, but there are now unit tests for most of the
scoring stuff.

Change-Id: I1a5badd89014dcce8d6b46cb4838190f94de7183