tsh: clean up onPlay
tsh: clean up onPlay

The code for `tsh play` is a bit hard to follow
(it's a triple-nested switch statement) because
the command is overloaded to do lots of different
things.

Try to make things clearer by adding docs and breaking
the code up into separate functions.

gravitational/teleport,gravitational/teleport,gravitational/teleport,gravitational/teleport,gravitational/teleport,gravitational/teleport