Only iterate through User objects with HomepageSettings

Otherwise, we make a query for the attributes of every user in the
system, one at a time.
Merge branch '4.2/optimize-homepage-upgrade'