Add a test to check if api/app/0 returns app or 404
Fix ID query. Closes #898

As 0 is treated as False in python, the query was not generated properly. This
commit fixes it.
Merge pull request #900 from PyBossa/issue-898-api-fix

Issue 898 api fix