Fix spelling errors
Clean and optimize type validation against authorized_types
Remove unused code and parameters for gen_auth_types

The variables 'gen_auth_types' and '_authorized_types' were removed
by commit 835288ad8fe918c6f36b302bc18957a7209630ea. This cleans up
some leftover usages.

Note that this changes the constructor signature of SchemaDocument.
Fix inherited queries (issue #106)

The commit 8e350ccf727845b2022315c0716b7724230c4391 broke support for
inherited queries. This fixes the issue.

Note that a query result will be cast to whichever registered type
its type_field indicates, not just those which are subtypes
of the cursor's collection.

Credit to effem-git@GitHub for the code.
Merge branch 'authorized_types'

* authorized_types:
  Remove unused code and parameters for gen_auth_types
  Clean and optimize type validation against authorized_types
  Fix spelling errors
Merge branch 'inherited_queries'

* inherited_queries:
  Fix inherited queries (issue #106)