SERVER-12153 SERVER-12171 Refactor CanonicalQuery::isValid()

Add unit test accordingly.
SERVER-12153 SERVER-12171 Restrict valid query expressions with $text

CanonicalQuery now refuses to canonicalize queries that contain
either:
- >1 $text clause
- $text inside a $nor clause
SERVER-12277 CanonicalQuery forbids queries with both $text and $near
SERVER-12257: on msync failure, check if the file is still mapped or not before failing
SERVER-11192 make sure to set all instances of the runCommandHook, for special DBClients
SERVER-12290: fix dropping non-existant collection error
SERVER-5470 projection support for planCacheGenerateKey command. implemented query plan revision policy for write operations