Add IM library. Refactor make_ninja to allow building IM library.

Currently, IM doesn't build (the headers are wrong). I need to change
the sources to fix it, but I'd like to get this checked-in clean first.
merged with origin/master
fix cp.py line endings
Build IM, png, zlib, jpeg (not used yet).

* build.ninja now depends on make_ninja.py in Makefile
* Refactored make_ninja to handle library dependencies
* Removed all references to <memory.h> from IM.
* Fixed a couple char* -> const char* warnings in IM.
Compile IM jpeg/png formats. Add libexif
Screenshot task. Doesn't do anything yet.
Thread -> SimulationThread. Task -> Task<T>
Move Simulation TaskQueue to SimulationThread object.

* Also quiet Makefile
* Also add binding for non-member functions to task.h
Move ownership of thread variables to SimulationThread.
Remove simulation_thread_task_queue.h
Add Thread<T> base class.
Screenshots work

* Added screenshot tab + button for now. Probably want something better
  but this is useful for testing.
* Added worker thread (just one thread, global)
* Added screenshot task. Just converts to jpg and posts to JS.
* Plumb the pp::Instance* through. Could be useful for other stuff.
Shrink, Crop, Adjust contrast.
Refactored to image operations.
More refactoring of screenshot:

* Added ScreenshotConfig that contains ImageOperations
* ScreenshotConfig is plumbed through from the instance
* Moved ImageOperation to image_operation.h
* Moved IM library stuff to im_utils.h
Parse screenshot image operations
Add request id to screenshot.

Screenshots are asynchronous, so we need to associate a request with the
response.
Presets with images. Todo: saved presets use images
Save screenshot to preset. Todo: load preset image from local storage
Merge branch 'master' into screenshots