Group identityMap and scheduledForDirtyCheck by class

Group these arrays by class name instead of root document class. This is necessary since documents in the same inheritance hierarchy may have the same ID. Perhaps they are stored in different collections, or a child document is embedded. It is not strictly necessary for scheduledForDirtyCheck, but we'll do it to be consistent.

Always store the serialized database identifier value in the identity map, to avoid potential conflicts among PHP values (e.g. MongoId and string).

The internal tryGetById() and getById() methods now take ClassMetadata, so they can ensure the $id argument is converted to a database value.

Functionality to clear UnitOfWork by a root document class will no longer work. It will be necessary to ensure root ClassMetadata instances know all of their child classes (currently only done for discriminated classes) for this functionality to be restored.
Use IDs if available when registering embedded documents with UnitOfWork

If the identifier is not available, the SPL object hash is used. Previously, it was always used for embedded documents.
Use base test's DocumentManager in IdTest
Allow for falsey, non-null identifiers in persistNew()