CRM-13871 Move code generation implementation into CRM/Core

----------------------------------------
* CRM-13871: Provide an ORM layer: Doctrine
  http://issues.civicrm.org/jira/browse/CRM-13871
Split code generation into components.

Parsing the specification has become its own class.

Templating has been abstracted, now beautifying is built into all php
generation.  We lose the singleton efficiency, it gained us a few seconds
at most.

Tasks are split into "plugins", and are fed the main CG object
as if it were a configuration object.  Eventually we will want to make
the configuration customizable.

* CRM-13871

----------------------------------------
* CRM-13871: Provide an ORM layer: Doctrine
  http://issues.civicrm.org/jira/browse/CRM-13871
Basic Doctrine annotations in DAO codegen

The "cardinality" attribute should be added to all foreign keys in
the schema.