Add last_updated and num_sounds fields to packs

These values are updated every time a pack is reprocessed (after
a sound is added to or removed from it).
Also update all queries to use these fields instead of aggregate
count/max queries
spelling mistake
Merge pull request #580 from MTG/packs

Optimise packs display
Don't use username when selecting sounds and packs from the database

Since we have the sound/pack id there's not really any reason to also
limit by the username. This speeds the query up a little bit (sometimes
not by much since the username is in an index anyway)
In order to keep the same behaviour as before (404 if the username
is wrong) check the username of the sound after it's been retrieved
Clean up some grammar on the registration page
Updated settings and middleware to properly respond to request.is_secure() calls and properly do redirects with www and non-www domains when using https
Merge branch 'apiv2'
Merge pull request #583 from MTG/spelling

Clean up some grammar on the registration page
Merge pull request #582 from MTG/sound_speed

Don't use username when selecting sounds and packs from the database