optimizing the history expiration to not query the mnesia table constantly
setting this timer to an appropriate value
Merge pull request #55 from lookio/master

optimizations