Fixed a lot of TODOs

The meaning of LH was determined (line height).  It seems to make
the animation look less like in a browser when I use it, so it's
disabled for now.  Code to set and use the variable lheight is
included, but the setting is commented out and replaced with a forced
set to 1.

The window's size is set to the actual size of the animation, plus a
one-pixel margin.  The margin's size may become configurable in the
future.

Frame stepping was changed so the main loop is run every sp instead
of every sp*cparams[frame][0].  This allows event processing to be
more responsive without resorting to multithreading.  While improving
frame stepping, I fixed the player so it no longer crashes upon
reaching the end of the animation.

With this more responsive event processing, I made a simple keyboard-
based control system.  Nothing fancy for now, but the animation can
be stepped through, paused, and skipped to start and end.

Related to the last two changes listed, looping now works.  It can
be toggled with the new controls.