Fix filtering aggregate metadata by key

Filtering by metadata key has no effect in the following two functions:

    aggregate_metadata_get_by_host
    aggregate_host_get_by_metadata_key

Rely on the explicit join instead of joinedload to load the _metadata
relationship in these functions (indicated by the contains_eager
option), so that filtering by key still applies when the metadata is
collected.

Fixes bug 1201283.

Conflicts:

	nova/tests/db/test_db_api.py

Change-Id: I3e44b5db8d67787bfa14f0e57d30a02a271a8833
(cherry picked from commit 7e8fa8f3e6acac0e510cd1fc5af591f9a321d03a)
Merge "Fix filtering aggregate metadata by key" into stable/grizzly