Adds new api namespace
Deprecates old json api
Adds serialized_ingredient method to Content
Change the element serializer response

* Moves from content objects to content_ids
* Adds ingredient objects
EssencePicture#serialized_ingredient includes content settings

Take the content settings, defined in elements.yml, into account while generating the picture_url
Fix handling of requesting unknown pages via api
Adds support for nested urlnames in pages api.
Map api requests within preview frame to pages api.
Include the link of essence in serialized content

EssenceText, EssenceLink and EssencePicture can have a link, this commit includes the link into the serialized object of Content.
Convert API controller specs into rspec 3 syntax
Refactors content and element permissions.

Uses newly introduced scopes and delegate methods on content model.
Make ApplicationController patch reloadable

and don't cache classes in tests!
Adds new API endpoints for contents

Adds three new API endpoints for loading Alchemy::Contents via json:

* /api/contents.json
* /api/elements/:element_id/contents.json
* /api/elements/:element_id/contents/:name.json
Convert essence_picture serializer spec into rspec 3 syntax
Merge branch 'master' into feature/json-api-namespace
Adds new API endpoints for elements and pages

Adds four new API endpoints for loading Alchemy::Elements and Alchemy::Pages via json:

* /api/pages.json
=> Returns all public pages. Pass page_layout to only return pages with given page layout

* /api/elements.json
=> Returns all public elements

* /api/pages/:page_id/elements.json
=> Returns all public elements for given page_id

* /api/pages/:page_id/elements/:named.json
=> Returns all public elements for given page_id and with given name.
Updates API routing specs.
Fixes api pages controller spec.
Adds upgrade note for '/api' namespace
Merge pull request #663 from magiclabs/feature/json-api-namespace

New json api namespace