Fix simple-db image filtering on extra properties

This fixes a bug in simple DB that causes filtering of images based on
extra-properties to fail. The current code works only when an image has no
extra-properties or exactly one. The current test suite doesn't include a test
that tries to filter images based on more than one extra-property.

Also, added both functional and unit tests to test image list with filters
using more than one extra-property.

Fixes bug: 1259227
Change-Id: I4c0d294585235dacbf154bf0df5d1e7c4a172cdd
Merge "Fix simple-db image filtering on extra properties"