Doctrine driver does not limit on publicKey when listing images

There was a bug in the Doctrine driver, causing requests against `/users/<user>/images` to actually return images for *all* public keys, not just the specified `<user>`.

This PR fixes this, and adds a test to the database suite which ensures all adapters implement this properly.