core/pouch: Guard queries against TypeError errors
core/pouch: Guard queries against TypeError errors

  In case PouchDB queries don't return rows or matches but don't throw
  errors either, our code would throw because we'd be trying to access
  the `length` property of `undefined`.

cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop