Adding periodic offset commitment to a BDB store.

Changes:
- Create a new task which commits the offsets to BDB every 5 seconds (configurable), move all the offset management into this task
- Better management of threads, config, failures