Auto commit timer is not periodic

The auto commit timer is one-shot. After the first commit, it does
not fire again. This ticket fixes the issue.

Also, in util.ReentrantTimer(), some duplicate code was cleaned up
Merge pull request #23 from mahendra/autocommit

Auto commit timer is not periodic