Added option to use different database or table for history
Ran PHPCS on Database post-rebasing branch
Merge pull request #722 from driusan/HistoryDB

Added option to use different database for history