Serialize ClassMetadata::$associationMappings correctly

Prior to this commit, APC cached ClassMetadata was completely broken. ClassMetadata::__sleep()
does not return associationMappings, which menas that when it is written to cache, that field
is not added.

When it is read from the cache it is simply an empty array. In certain cases this can cause
problems (data loss).
Merge pull request #806 from researchgate/serialize-classmetadata

Serialize ClassMetadata::$associationMappings correctly