Cleaned up the Counter layer

- Flow the CancellationTokens
- Do not run multiple coalesce at the same time, it can only lead to conflicts
- lock the Random instance because it is not thread-safe
- moved the @transactional methods into a static extension class
- added more unit tests