Refine TransactionTypes

1. Refined transaction types.
2. Added a MULT_LEGGED, TRANSFER_IN and TRANSFER_OUT.
3. Created CommitException in preparation for MULTI_LEGGED transactions
(i.e. transfers)
4. Moved the Transaction class to an abstract super class which will be
derived for specific transaction types
5. Added a commit() method that is required to throw an exception if
the transaction cannot be committed.
6. Updated the TransactionTest class