totally refactored the ClassMetadata class to store all mappings in a single array

this PR came out of http://doctrine-project.org/jira/browse/PHPCR-79
in order to make the implementation of a type guesser easier (https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/56)