api: allow usage of resource_metadata in query

When returning samples, they have a field called resource_metadata, and
therefore it may seem nature to filter on it using this as a prefix in
queries. Let's allow use of it.

Fixes-Bug: #1195765

Change-Id: I82f591e0d38a3063a9762de1ac64dc3ef9d29ee7
Merge "api: allow usage of resource_metadata in query"