(nick-thompson/express-pouchdb#42) - WIP - fix metadata.id

So don't ask me why, but occasionally metadata
is undefined here, so this throws an error in
PouchDB server when you run npm test against it.
Related to #2282.