Use txn for ListOp sources

Previously ListAddOp and ListMultiAddOp accepted functions with no
parameters to generate new contents - however if the contents are made
using Boxes, they should use the same transaction that modifies the
list. To allow this, they now accept functions with Txn parameter.
Updated SineDemo to reflect this. This fixes a problem with the demo,
where deleting all entries then adding a new entry caused failed
reactions - the nested transaction creates new Sines that do not exist
in the transaction where we are attempting to add them to the list.
This needs to be looked at more generally, since nested transactions
will generally be pointless, a problem, or both. Nested transactions
that return no value should be acceptable, as long as users are aware
they will not be rolled back by the containing transaction.
Made use of mutable/immutable collections clearer

Removed most mutable collections, use vars instead. Changed imports to
make mutable collections obvious.