Fix a couple bugs with the distributed rate limit sync.

- The main issue was that after starting, the polling typically wasn't
  working because the polling would get stuck as soon as it hit a
  polling cycle where there was no Mongo data returned.
- On starting up, the sync was always back-syncing 1 hours worth of
  data. This has been changed to sync the amount of data appropriate for
  each rate limit bucket (so a per minute rate limit will only sync the
  last minute, per day limits will successfully sync the whole day).
  This fixes the handling of longer duration rate limits, and also
  prevents unnecessary syncing of expired data on shorter rate limits.