Make Blink program run in Emscripten/browser

Because Emscripten/JS cannot run the destructors of static/globally
allocated C++ classes, we scope all classes to a function and just run
it for a limited time in main to play through our demo program.
Further work will expose the C++ classes to JS, possibly using embind
and let JS drive the interactions.
Closes #34