Add basic code for getting form attributes and group #1

Added /forms/:form_id/attributes
Added /forms/:form_id/groups
Reduces code duplication by reusing attribute() and group() fns
DELETE forms/:id - Return JSON and delete related objects #1

Returns an empty array or the form just deleted (if it exists)
Deleting a form will now delete its attributes and groups too.
Add URLs to response objects

Allows us to link from forms to attributes, etc
Add datetime attribute type
Add foreign keys for form_groups and form_attributes
Add GET request for individual attributes and groups

* Add GET /api/forms/:form_id/attributes/:id
* Add GET /api/forms/:form_id/groups/:id
* Fix docblock for GET /api/forms/:form_id/attributes
* Fix docblock for GET /api/forms/:form_id/groups
* Add links from groups to their forms
* Add links from attributes to their form and group
Build out PUT forms/:id
Add PUT/POST/DELETE actions for forms and attributes

* Add POST /api/forms/:form_id/attributes/
* Add POST /api/forms/:form_id/groups/
* Add PUT /api/forms/:form_id/attributes/:id
* Add PUT /api/forms/:form_id/groups/:id
* Add DELETE /api/forms/:form_id/attributes/:id
* Add DELETE /api/forms/:form_id/groups/:id
Add GET/POST actions for /api/forms/:form_id/groups/:id/attributes

These are convenience methods for listing a groups attributes
or adding a new attribute to a group.

Need to think about code reuse on POST action
Add behat test for Form updates

* Add thatIWantToUpdateA() step definition to RestContext()
* Add PUT handling as restObjectMethod
* Add test for Updateing a form
* Also fix teardown() to disable FK checks before truncating tables
Add tests for attributes and groups

* Add behat forms/api.attributes.feature
* Add behat forms/api.groups.feature
* Add featureSetup() as BeforeFeature hook to create a known
  form, group and attribute (all ID 1)
* Clear DB in BeforeSuite hook.
Add validation check for unique attribute key
Add @todos for setting proper HTTP codes on error
PSR-0 compliance on rjmackay/develop branch
Move static form/group/attribute functions out of controllers into models

Getting this out of static method and models feels like a better fit.
Not totally sure about the for_api() fn naming yet.
Add custom error view so that API returns errors as JSON

Possibly a bit of a hack and might need to be replace later when non-api
controllers are added.
Remove custom Form::delete() since cascade delete is handled by DB
Merge pull request #10 from rjmackay/api-forms-groups-attrs

Code review: forms/groups/attributes APIs
Database Migrations

* Added Minion - A command-line task runner
* Added Migrations a module for rails style migrations
* Instructions for running database migrations at: https://wiki.ushahidi.com/display/WIKI/Migrations
* closes #13
Merge pull request #20 from ushahidi/migration-module

Database Migrations