Made debug output a query parameter instead of a per-model constant
Move debug flag from query object to TrainPlan object

This is a much more natural place to put this.
Minor bug-fixes in main script

Get rid of a repeated default parameter to add_argument
Explicitly calculate perplexity to avoid doubly calculating likelihood
Fix a typo
Make naming of algorithms more explicit in main script
Make visible function to same from YV model
Final fixes for main script (open output file for _writing_)

Also renamed some methods, which in turn required altering all the
places (mostly tests) that they were used in