SERVER-8871 added sorting of cacheable queries and plan cache key generation