Shorten the top-of-file docstring, and put the global vars earlier.

Summary:
Fix the dashboard scraper now that the dashboard has lots of urls.

Now instead of sending in an html page for the python script to parse,
we actually fetch the chart-data directly in the shell script, for
each of the 14 charts that GAE shows on the admin consol 'dashboards'
page.

We then bundle all that chart-data up into a giant json struct and
send *that* to the python script.  It's kinda fun, in a scray kind of
way, to construct json via shell 'echo' commands. :-}

Since we're passing in json, we now have an opportunity to pass in
some other info as well, that we used to just have to manually keep in
sync between the shell script and the python script, such as how big a
time-window the chart should be (6 hrs, 24 hrs, etc).

Make _time_windows just a list.

We never index it by name, so no need for it to be an ordered-dict.

Test Plan:
Set up all the necessary secrets on my home machine and ran
   env srcdir=. username=prod-deploy@khanacademy.org ./fetch_stats.sh -v

and saw it emit this:

  {'average_memory_mb': 297.1, 'average_qps': 0.504, 'num_instances': 747, 'utc_datetime': datetime.datetime(2014, 4, 18, 22, 49, 43), 'average_latency_ms': 404.1}
  {'oldest_item_age_seconds': 103879, 'utc_datetime': datetime.datetime(2014, 4, 18, 22, 49, 53), 'miss_count': 12835081, 'hit_ratio': 0.87, 'item_count': 123295, 'hit_count': 86659639, 'total_cache_size_bytes': 4288114546}
  [{'milliseconds_used_per_second': 238700.0, 'memcache_ops_per_second': 3410.0, 'dynamic_requests_per_second': 410.0, 'memcache_total_bytes_per_second': 52290000.0, 'milliseconds_per_dynamic_request': 582.4, 'api_cpu_seconds_used_per_second': 0.09768, 'active_instance_count': 223.1, 'utc_datetime': datetime.datetime(2014, 4, 18, 22, 27, 1), 'memcache_compute_units_per_second': 8630.0, 'billed_instance_count': 920.5, 'memcache_bytes_sent_per_second': 13550000.0, 'server_errors_per_second': 0.1062, 'milliseconds_per_loading_request': 9604.0, 'total_cpu_seconds_used_per_second': 182.0, 'dos_api_denials_per_second': 0.0, 'bytes_sent_per_second': 10800000.0, 'cached_requests_per_second': 283.8, 'static_requests_per_second': 8.303, 'client_errors_per_second': 3.2, 'memcache_size_mb': 4087.0, 'memory_usage_mb': 251300.0, 'memcache_bytes_received_per_second': 38740000.0, 'total_instance_count': 1436.0, 'bytes_received_per_second': 1211000.0, 'quota_denials_per_second': 0.0}, {'milliseconds_used_per_second': 196400.0, 'memcache_ops_per_second': 3392.0, 'dynamic_requests_per_second': 409.5, 'memcache_total_bytes_per_second': 49050000.0, 'milliseconds_per_dynamic_request': 479.9, 'api_cpu_seconds_used_per_second': 0.09768, 'active_instance_count': 179.1, 'utc_datetime': datetime.datetime(2014, 4, 18, 22, 31, 56), 'memcache_compute_units_per_second': 8488.0, 'billed_instance_count': 890.5, 'memcache_bytes_sent_per_second': 13580000.0, 'server_errors_per_second': 0.1062, 'milliseconds_per_loading_request': 5007.0, 'total_cpu_seconds_used_per_second': 180.4, 'dos_api_denials_per_second': 0.0, 'bytes_sent_per_second': 9978000.0, 'cached_requests_per_second': 271.3, 'static_requests_per_second': 5.372, 'client_errors_per_second': 2.821, 'memcache_size_mb': 4088.0, 'memory_usage_mb': 266100.0, 'memcache_bytes_received_per_second': 35440000.0, 'total_instance_count': 1429.0, 'bytes_received_per_second': 1192000.0, 'quota_denials_per_second': 0.0}, {'milliseconds_used_per_second': 193800.0, 'memcache_ops_per_second': 3419.0, 'dynamic_requests_per_second': 399.5, 'memcache_total_bytes_per_second': 52320000.0, 'milliseconds_per_dynamic_request': 485.3, 'api_cpu_seconds_used_per_second': 0.09768, 'active_instance_count': 183.9, 'utc_datetime': datetime.datetime(2014, 4, 18, 22, 36, 52), 'memcache_compute_units_per_second': 8615.0, 'billed_instance_count': 900.7, 'memcache_bytes_sent_per_second': 13610000.0, 'server_errors_per_second': 0.08608, 'milliseconds_per_loading_request': 6429.0, 'total_cpu_seconds_used_per_second': 173.3, 'dos_api_denials_per_second': 0.0, 'bytes_sent_per_second': 9944000.0, 'cached_requests_per_second': 279.6, 'static_requests_per_second': 5.617, 'client_errors_per_second': 4.61, 'memcache_size_mb': 4087.0, 'memory_usage_mb': 222000.0, 'memcache_bytes_received_per_second': 38680000.0, 'total_instance_count': 1263.0, 'bytes_received_per_second': 1182000.0, 'quota_denials_per_second': 0.0}]
  Importing 3 records

which seems plausible to me.  I'm not sure why it was getting 15
minutes' worth of data rather than just 5, but kinda fun to see that
part of the code is still working.

None

(same)

Reviewers: chris

Reviewed By: chris

Differential Revision: http://phabricator.khanacademy.org/D8368