Reduces number of database queries made by triangularisation

Triangularisation references Person when in fact the inner loop does not depend on Person and instead refers solely to the SparseArray.

This commit modifies the triangularisation to only depend on the SpareArray.
Merge pull request #8 from lukegb/patch-1

Reduces number of database queries made by triangularisation
Add debug page
Constraint purchase amount to >0
Similarly for an acceptance
Move to AmountMultiplier mixin, fix owednesses
Also fixup minimal_transactions to use amountmultiplier
Allow entering purchases made by another user