Add tests for empty docid in database api calls

Empty docids can end up as valid couchdb api calls because couch will
ignore the second / in the url. This can give strange responses and maybe
even security issues.