Small performance tweaks to mirror status JSON encoding

Do a few things to speed up the encoding of the JSON, including better
usage of list comprehensions, less dynamic setattr() usage, and removal
of the queryset specialization since we can easily do it outside of the
encoder.

Signed-off-by: Dan McGee <dan@archlinux.org>
Remove queryset specialization in JSON encoder

Signed-off-by: Dan McGee <dan@archlinux.org>
Reduce complexity of status data URL query

Get rid of all the junk trying to only return URLs that have been
checked in the last 24 hours; it just isn't worth it. Instead, do that
screening only in the views that need it, namely the HTML status page.

Signed-off-by: Dan McGee <dan@archlinux.org>
Simplify/clean-up finding of download mirror

Signed-off-by: Dan McGee <dan@archlinux.org>
Move caching of function data back to get_mirror_statuses

We've moved this around a few times, including changing the parameters
to ensure they are stable (commit bdfa22500f4). However, the bulk of the
work takes place in the mashing up of the data, so cache the full result
rather than just the result of a single query.

Signed-off-by: Dan McGee <dan@archlinux.org>