Add a lastsold column to stock types

lastsold column is used in the forthcoming "sanity check" script.
Performance improvement loading transactions

Dealing with recall of transactions with lots of lines was getting slow!
Avoid multiple database round-trips.
quicktill 0.10.39
Merge branch 'performance'