Prepare bundle for API tests using rack-test.
Prepare authentication_token for user model.

+ Add namespaces to farms resources.
+ Add basic API test for farm model.
Add before_save filter.

+ Disabled since migration does not work for some reason.
Modify Rakefile.
Bugfix: Remove buggy role creation in seed script.

+ Additional roles without name are created by this code.
+ The method "add_role" already creates a role instance.
Prepare read access test for logged-in user for farms.

+ Add test users, roles and farms to seed script.
Change devise configuration to fix 'sign out'-spec.

Sign out with a get request instead of a delete request for tests, as delete-requests are not compatible with Capybara.
Disable failing JSON spec for now. All JSON specs will be replaced with API-specs later.
Merge branch 'api_namespace' into prototype
Restore the previous farm resource routes (in the top-level namespace) to avoid breaking request specs.
Scope the Rack-test includes to type 'request'. The API specs don't see the 'app' variable without this.
Delete the migrations that add and later remove the 'superadmin'-column of the user model.

- They are no longer necessary and have opposites effects, cancelling each other out.
- They break as soon as token-authentication with Devise is enabled, so there's no use in keeping them around..
Re-enable the "ensure_authentication_token" before-filter.

The offending (broken and no longer useful) migrations have been deleted.
Restore foreign key and index that have been removed in commit 163f98b.
Enable devise config "token_authentication_key" to make sure we use the correct parameter name.
Pass the authentication token with the GET request to sign in the user.