Add maxVolatileTime para to control data provider flush interval and little refactors
Flush data when data provider time out
Fix a bug in lockAndSwapMem and some refactors
Merge branch 'master' of https://github.com/senseidb/zoie into senseidb-zoie