add ability to render to jpeg
get rid of page size defaults, needless complexity
add a debug mode to print what's happening
broken: doesn't work due to race conditions between 2 waits

Tries to allow waiting for the next phantom to finish.
Still want to commit this work in case I need to revisit it.
add wait_next call to wait next phantom process to finish
ensure wait_next handles zero threads
recombine render.js and render_text.js