Allow animations to be driven by external events

Simple refactoring of fx.js to pull out the heavy lifting in the timer function to an animateTo(pos) function.  Also updated animate() function to not start timers if provided duration is less than zero.

Add a demos directory with one html file that demonstrates how to take advantage of the refactored code.