Add :update applet argument for functional equivalent of :draw function.

A shot at implementing what we discussed on IRC.

Also needs to accept initial :state as an argument, though it looks
like that's used for other things I don't entirely understand.