added sync and atomic boolean check to gaurd against reference stomping on counter batch submit as in USERGRID-1283
switched to ReentrantLock for cleaner checking semantics
Merge pull request #263 from apigee/wedged-counter-threads

Wedged counter threads
Merge branch 'refs/heads/tracking-public'