fixed bad entities, CRM-14311

----------------------------------------
* CRM-14311: Add metadata to doctrine entities
  http://issues.civicrm.org/jira/browse/CRM-14311
Merge pull request #2620 from kurund/CRM-14311

fixed bad entities, CRM-14311
CRM_Core_ClassLoader - Remove dead code. Prefer composer autoloading. Fail safely.
CRM_Core_Invoke - Allow Symfony-like controllers:

* Inject Symfony request objects (for pages & controllers)
* Allow Symfony response objects
* Allow PHP 5.3 namespaces
CRM-13986 - Add hateoas-php
CRM-13986 - hateoas-php - Add example HAL link with URL generator
CRM-13986 - Update composer.lock
CRM-13986 - Manage names and slugs for API entities

For REST purposes, we need a way to map entity slugs (URL-style names) to
entity classes. This commit provides the following infrastructure:

 - Civi\API\Registry scans the Doctrine entities and stores the list of slugs in Doctrine's metadata cache.
 - The default slug is based on taking the entity-class-name (without the namespace) and changing the first char to lowercase.
 - @Civi\API\Annotation\Entity provides a way to override these slugs for a particular entity.

For cohesion, this commit also moves Civi\Core\Page\Rest to Civi\API\Page\REST.
CRM-13986 - REST - Add features and test case:

* Add support for filtering collections
* Add XML output
* Implement DELETE
* Change JSON mime type
* Revise error messages
Temporarily tweak annotations for REST compatibility