use iterators to read data and outcome files

Instead of slurping the whole data and outcome files at once, create a
subs to iterate over the lines. This will make it easier to merge the
two processes down the line.
make outcomelist consistent with or without outcome file

Previously, having an outcome file would result in a number of outcomes
equal to the number of data items, which made the number less useful
and probably messed up the printing of gangs. The documentation in
AM.pm claims that @outcomelist contains unique outcomes, but this is
not the case with an outcome file. Change the way outcomelist is
created when reading a project file so that it contains only unique
outcomes. Add a test for the return value of num_outcomes when using
an outcome file, and change tests where needed to expect unique
outcomes instead of the expanded list.
Combined outcome and data reading into one process

Instead of reading data and outcome files during separate processes,
read them at the same time using the new iterators and add all of
the data pertaining to an exemplar at one time using _add_data.
refactor all state change into _add_data

Previously, several aspects of project state were changed only after
the entirety of the project files had been read. Move all state changes
into the _add_data method so that it is kept updated every time a new
exemplar is added to the set. Change the format methods so that they
are read-only and use current state values to construct a format
variable when called (a very fast operation).

Along the way, remove now-unneeded methods related to outcome file
loading, and update TODO.txt as ideas occur.

With all of the state change now in one place, _add_data can safely be
made into a public method so that we no longer need to place the data
into files. This is a much more flexible solution.
unify test and train data handling

Create a new method for adding individual test items. Factor out a
method for checking data vectors for correct size and use it in both
_add_data and a new method for adding test items. Also use
_read_data_sub to read the test file. Do not re-read the data file
if there is no test file. Instead, copy the data previously read and
stored.