Added the Queue class as a generic queued action processing engine. Refactored the current queue for processing transactions to use Queue.