Big partly-breaking rewrite.

Simplifies plugin registration and execution.

Many changes based on wilson428's ideas, code.

Converted examples/simple-chart.html to work, but other examples don't
yet work.