Remove Version class from console application and docs

This should have been done with 18590f49bff8272bc77bb1849ffd2b54c952c3d5
Revise console application and documentation

Replace trivial odm:query example with an explanation of where to find the reference implementation and how to proceed with configuration.
Merge pull request #894 from doctrine/doc-console-commands

Remove Version class refs and revise console command docs
Added missing GENERATOR_TYPES
Merge pull request #876
Added references() and includesReferenceTo() to Query Builder reference
Revise docs for query builder reference method examples
Merge pull request #815
Remove test for ReferenceOne with null identifier

This test was originally added alongside a ReferenceMany test in d1b0ed3571048d382c58d81acbf5fcecd73c133e, but the latter was removed in a2c3ddd4e376e6a85a55a944701f3cfab9e59119 when @jwage added tests for non-scalar identifiers. The ReferenceOne test likely should have been removed at that point, too.

This fixes a build failure with Doctrine Common 2.4.2, due to doctrine/common#298. Therein, the common proxy classes no longer allow for null identifiers, even though they are technically valid in MongoDB.
Use PHPUnit expectedException annotation
Merge pull request #900 from doctrine/fix-references-test

Fix ReferencesTest failure with Doctrine Common 2.4.2
Fix the "Erroneous data format for unserializing" error message
Use existing ReflectionClass for ClassMetadata new instance creation
Merge pull request #893
Fix undefined index error recomputing changesets for documents without one
Rewrite #897 fix and test to be consistent with ORM

This makes the test more in line with the corresponding ORM fix in doctrine/doctrine2@d473824279bfee19772bb1692d2a3453a2aff233. Our lifecycle callbacks to not yet receive event arguments, so the DocumentManager must be injected into the document manually (yes, this is a hack).
Merge pull request #897
Ensure "cascade" mapping is set for ResolveTargetDocumentListener

ResolveTargetDocumentListener expects $mapping['cascade'] to be set, while it previously may not have been depending on how the ClassMetadata was defined (the "isCascade*" fiels were always set).

This also makes the cascade handling consistent with ORM.
Merge pull request #888
Add ResolveTargetDocumentListener section to 1.0.0-BETA10 changelog