Merge pull request #2635 from fabriziofortino/develop

stats functions: added mode
Issue #1611 2Q cache with much more higher lock granularity was implemented.
Issue #1611 more weak lock is used in Orient class for storage management.