Fix rate limits not being applied depending on ordering of limits.

This was broken by the attempted fix in
48ad9452fdce232f054b3d9f72888820400a1c16
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.
Some ugly, temporary workarounds for DNS resolution issues.

Basically, all this temporarily works around issues with our DNS
resolver and TTLs. Our DNS resolver was semi-ignoring short TTLs, so we
didn't continuously restart nginx when dealing with hosts like Akamai,
where we seem to constantly get two different IPs back that are both
valid. However, our over-agressiveness with TTLs turned out to break
other hosts, like ELBs, where the IPs changed less frequently, but
when they did, it was important that it be reflected.

This isn't a great solution, but hopefully it will temporarily do the
trick. The real solution is on the config branch, where we're splitting
up the nginx servers, so then we can more readily restart the router
nginx server whenever we please (that should allow us to actually
respect TTLs, and clean all of this DNS business up a lot).
Cleanup logging a little bit.

Should still make this less verbose after testing.
Fix missing semi-colons.
Quiet the logging for dns resolving, since I think this is working.
Tweak restart logic for IP address changes.
Fix missing semi-colons.
Prevent super-frequent DNS polling (eg, every 1 second).
Add functionality to limit access based on IP or HTTP Referer.

This access can be restricted at either the API level or user level.
In the user case, the limitations are additive to whatever the API
settings are (so a user can't be granted access to an API that's more
restrictive).
Allow gatekeeper errors to be returned to any origin when using CORS.
Add control to how api key rate limits are applied to anonymous users.
Clarify "only_ip" anonymous rate limit behavior.

And test the fact that it doesn't actually return a response header once
the primary api key limit is gone.
Increase verbosity of DNS resolver logging.
Testing out Shippable CI.
I think this finally sorts out DNS resolving edge-case oddities.

Now the dns resolver should always trigger changes when new IPs are
seen, even if those IPs had been seen previously (we were
unintentionally keeping all recently seen IPs in memory which we don't
want anymore for hosts we're not caching).
Allow the global rate limits applied in nginx to be configurable.
Fix typo to change rate limit back to what it was.
Cut down on DNS changes for some other domains that frequently churn.
Fix so DNS changes properly write the nginx config and reload nginx.