Use an inner join on aggregate_hosts in aggregate_get_by_host

Fixes bug 1187708

By default, sqlalchemy.orm.joinedload does a left outer join.  But in
aggregate_get_by_host, we only want to get aggregates rows with
aggregate_hosts rows that match the host, and a left outer join also
gave us aggregates rows with no matching aggregate_hosts row.

Also improve test_aggregate_get_by_host to catch this bug.

Change-Id: Ida9647af02ab58229abe3c50dc3d2c7ec9792a5e
Merge "Use an inner join on aggregate_hosts in aggregate_get_by_host"