Remove code
Remove old tests
Update default theme
Get session in the beginning to avoid unboundLocalError if except occurs
use sql for auth task_run
Merge branch 'presenter-fixes' of https://github.com/PyBossa/pybossa into presenter-fixes

* 'presenter-fixes' of https://github.com/PyBossa/pybossa:
  use sql for auth task_run
authorized is when count==0
Merge branch 'presenter-fixes' of https://github.com/PyBossa/pybossa into presenter-fixes

* 'presenter-fixes' of https://github.com/PyBossa/pybossa:
  authorized is when count==0
Separate queries for user_ip and user_id
Fixed tests
Remove unused import
Use explicitly current user id for task runs
Mock request
Merge pull request #883 from PyBossa/presenter-fixes

Also performance fixes for tasks.