A few docstring additions, style cleanups, etc.  No functional change.

Summary:
Rewrite so extract_files() sorts the matches-map, rather than make_potfile.

I think this fits the API abstraction layer, because now we can
promise extract_files() always gives reproducible results, which all
callers of extract_files() are likely to want.

In particular, the json output is now in a fixed order, whereas before
the order was arbitrary.  (The json output is now also a bunch of
lists rather than a map of lists.)

This will also make it easier to add pybabel support.

Add pybabel support via a babel_extract() method.

This just wraps the existing extraction functionality into the API
that pybabel expects.  To be able to share code from the main routine
and pybabel a bit better, I created a new _filename_to_url() method.
To make pybabel runs a bit quieter, I added a --quiet flag.

Also, to make these urls consistent with the ones from the datastore,
I use http://khanacademy.org, not https://.

Test Plan:
Added these lines to babel.ini:
  [exercises: khan-exercises/**.html]
  [extractors]
  exercises = extract_strings:babel_extract

and then ran
   tools/pybabel extract -F tools/babel.ini .

I saw two good things:
1) We were correctly merging the exercise titles with their copies in
the datastore:
  #. -- Pretty display name for exercise
  #. http://www.khanacademy.org/exercise/balancing_chemical_equations
  #. -- Text is in
  #. http://www.khanacademy.org/exercise/balancing_chemical_equations
  #: datastore/current.sqlite:1
  #: khan-exercises/exercises/balancing_chemical_equations.html:1
  msgid "Balancing chemical equations"
  msgstr ""

2) We had exercise-only text:
  #. -- Text is in http://www.khanacademy.org/exercise/z_scores_3
  #: khan-exercises/exercises/z_scores_3.html:1
  msgid ""
  "<code>1 - <var>ZGRID[ROW_INDEX_1][COL_INDEX_1]</var> = <var>roundTo(4, 1 "
  "- ZGRID[ROW_INDEX_1][COL_INDEX_1])</var></code>. This value, <code "
  "class=\"hint_orange\"><var>roundTo(4, 1 - "
  "ZGRID[ROW_INDEX_1][COL_INDEX_1])</var></code>, represents the portion of "
  "the population that scored lower than <code><var>GRADES[0]</var></code> "
  "on the exam."
  msgstr ""

Reviewers: john

Reviewed By: john

CC: alpert

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