Throw an exception if the given easing function is not valid

should help tracking down issues when upgrading to last version of
melonjs (and the new embedded tween library version)
[#59] simplified and fixed the logic for `auto-sort`, and added a flag to enable/disable recursive sorting (off by default)