Use time delta to update loop.
Fix bug in get_action_id.
Calculate duration based on penultimate frame.

The last and first frames should be identical, so the last frame
should not count for the duration.
Calculate the correct frame times and interpolation values for
animation and root motion.