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 support for inserting items
* Add XML output
* Implement DELETE
* Change JSON mime type
* Revise error messages
* Enforce @CiviAPI\Permission annotations
Temporarily tweak annotations for REST compatibility
Remove CRM_Core_Container (in favor of Civi\Core\Container)
Merge pull request #2612 from totten/doctrine-hateoas

CRM-13986 - Add example REST interface
more fixes to entities to match schema, CRM-14311

----------------------------------------
* CRM-14311: Add metadata to doctrine entities
  http://issues.civicrm.org/jira/browse/CRM-14311
added more meta data to entities, also added API annotations, CRM-14311 CRM-14330

----------------------------------------
* CRM-14311: Add metadata to doctrine entities
  http://issues.civicrm.org/jira/browse/CRM-14311
* CRM-14330: Add REST-related annotations to generated entities
  http://issues.civicrm.org/jira/browse/CRM-14330