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 <tt>util.ReentrantTimer()</tt>, some duplicate code was cleaned up