add sample CLI command, client-side code to make it work

the server-side code is still out-of-date and must be rewritten
rewrite web handling, make sample command work
update control.html and includes
add d3.js (minified, v3.2.7) to media/
web.py: minor cleanup