Check whether a month is followed by a year

Bug fix for #375
Handle POST_COST_VIRTUAL in print

Bug fix for #1046
Move the debug statement to where it makes more sense

It's possible to just say "select account" without a "from", so
put the debug statement at the end of the block where the variable
"formatter" is filled with the query string.
Fix query string for select account

A wrong query string was generated by "select account": one ansify_if()
too much was listed and justify() was called with the wrong parameters.

Bug fix for #744
Recognize --cleared-format option

Bug fix for #747
Remove character that wasn't displayed in ledger2
Improve backwards compatibility with ledger2

This brings some single character format strings in line with what
they actually meant in ledger2.

Bug fix for #755