Adds Transaction and category models.

Also adds State Machine gem to manage states of transactions.