Turn graphie-to-png into graphie-to-svg+labels

Summary:
Add support for graphie-to-png to produce svg+labels. Since .svg-labels
links are not real links to images, we also change the interface a bit.
Also, add a preview button to the interface to allow for previewing old
images.

To generate the .svg-labels, we simply use graphie to render the svg and
labels. By adding in some hooks to the graphie interface, we intercept
the calls to labels to keep track of them. We then simply use
`.innerHTML` to pull out the SVGs. To ensure that the renderings are the
same, we use a phantomjs script on the server to do the renderings.

I've also created a module for doing some basic minification on the
SVGs. Using some techniques from
https://github.com/petercollingridge/SVG-Optimiser, I remove some
unneeded styles, reduce the accuracy on paths from 14 decimal places to
~2-4, and perform deduplication on clip-paths.

I added the mac phantomjs binary to the repo to do the svg extraction.
There doesn't appear to be a reasonable rpository to add as a submodule
to do this.

I also added a requirements.txt, because I had no idea what things were
required, and now I added some things (lxml, svg.path).

Test Plan:
 - Render all 42 templates to SVG, and visually compare the rendering in
   graphie-to-png with the result in perseus.
 - Do the same thing with firefox, IE 9, and IE 11.
 - Ensure that the interface works:
   - Select a template. Ensure that the 'regraph' and 'convert to image'
     buttons are available to be pressed.
   - When the 'convert to image' button is pressed, ensure that a
     throbber appears, and then ensure that a URL appears in the
     provided box.
   - When the template is modified, ensure that the 'convert to image'
     button is disabled
   - When the template is undone to its previous state again, ensure
     that the 'convert to image' button is re-enabled
   - Edit the template again.
   - When the 'regraph' button is pressed, ensure that the 'convert to
     image' button is enabled again, and the url field disappears.
   - Click the 'convert to image' button again. Edit the template.
   - When another template is selected, ensure that both the url field
     disappears, and that the 'convert to image' button becomes enabled.

Reviewers: aria, alpert, eater

Reviewed By: eater

Differential Revision: https://phabricator.khanacademy.org/D14651