Fix phantom.js build command
Only generate a pdf if we’re not copying one.

There’s no point copying *and* generating a pdf. Let’s do one or the
other.
Use npm-installed version of phantomjs.

Versions newer than 1.9.2 appear to have font problems, so we set an
upper bound on the version for now.
Add pandoc pagebreak filter
Add a custom PDF footer with phantomjs
Add some extra html markup via javascript.

In order to style up some elements for pdf generation, it’s necessary
to add some spans via javascript. Some of this can be fixed by
modifying lesson markdown / manifests, but it’s perhaps simplest to
do it this way.
Add a legend template; move it into position in js
Lots of new PDF styles!
Move js run by phantomjs to assets/js; rename
Undo 3800f2b5; add pagebreaks with an extra class.

The pagebreak filter was messy and a bad idea! I should have done it
this way in the first place.
Get wkhtmltopdf working as well
Add a command line switch to enable pdf generation
Remove all pdf-specific stuff from generated HTML

 - Split PDF-specific styles out into separate files
 - Only load PDF styles when we’re rendering a PDF
 - Similarly, only load PDF-specific js when we’re rendering a PDF
 - Reinstate original print css
Generalise rasterize.js

 - Add an option parser
 - Add --footer, --style and --script args
 - Import footer content from a template file
pdf.js shouldn’t make assumptions about html
css tweaks (based on inspecting output)
Ignore wkhtmltopdf errors.

The wkhtmltopdf call is pretty flaky. If it breaks, it’s not the end of
the world.
Make it easier to test auto PDF generation

 - Never attempt to auto-generate notes or extras
 - Add an extra option to use both phantomjs and wkhtmltopdf to
   generated PDFs (for comparison)
 - Generate a PDF even if one already exists in input (again, for
   comparison)
 - Display the auto-generated PDF listings a bit more nicely
   (right-aligned, that sort of thing)
Couple of pdf.js fixes

 - Wait for the DOM to fully load before running
 - Split level with regex rather than on word ‘level’. Regexing for a
   number is a more general solution.
Make phantomjs wait until js has finished running…

…or until it times out.