Multiplying duration by 1000 at set time saves multiplication calls at render time.

Note: I don't think I broke anything, but I don't know how and/or can't test all the transition code, and I had to touch it to keep the duration passed to it in increments of seconds, instead of ms.

Animations will also now unschedule themselves if they lose all their targets, and reschedule themselves if they regain targets.

Also removed some redundant and/or excess code.