add calculateAnimationLengths utility

Get the length of all the animations in a sprite