Fix key search for animation curves

The binary search used to determine the key id in an animation curve
(USBinarySearchNearest) never returned the last key for curves with
an even number of keys.

Fixed by replacing the break conditions with a stricter loop condition
and returning either the lower or the upper bound (i or j).
Merge pull request #673 from theGoodEvil/fix_anim_curve_key_search

Fix Key Frame Search for Animation Curves
No changes made manually to Atari.h, but it is believed that the file got checked in with weird / mixed line endings. It is believed that commiting it this way will fix it.