Show global stats via API
Delete api.py to refactor it in a module.

Additionally, add some extra error messages to the error package.
Refactor API with a new module.

This commit refactors the api.py file into a full module. In general, each
domain object has now its own file, where all the changes can be tracked more
easily.

Additionally, a Global Stats endpoint has been added to export global
statistics of the PyBossa server in JSON format.
Fix ratelimit and crossdomain.
Unit Test improvements.

Cover more code with new API refactoring
Fix documentation.
Merge pull request #653 from PyBossa/issue-stats

Issue stats