Add a longer timeout.
Refactor timeouts.
Fix tests.
Merge pull request #938 from PyBossa/issue-fix-timeout

Add a longer timeout.