Compute task host attribute aggregates once when scheduling tasks.

Reviewed at https://reviews.apache.org/r/18157/