Allow filters to only run once per request if their data is static

Currently the filter_all() method of each scheduler filter is run
once for each resource in a request, but for many filters the data
doesn't change during a request.

For example the data used by the AZ filter is pretty static, and
doesn't filter any more hosts on successive runs. However it is
fairly expensive to run on a large system.

Only filters that are based on data that may change within a
request, for example resource consumption, need to be evaluated
for each resource.

This patch adds a new attribute that allows filters to declare that
they only need to be run once per request. The default behavior is
left so that a filter is evaluated once for each resource in a
request.

Port from nova: Ia668f16414da86441323c58b1bbef5f88c81b90c

Change-Id: Ic656f1aa6830ed9b93c232a2098318e498a7d59e
Implements bp once-per-request-filters
Merge "Allow filters to only run once per request if their data is static"