Add the remaining parts of the tutorial framework

This is Sandy's code, taken from https://github.com/web-animations/web-animations-js/pull/84, with the commits reorganised.