Merge pull request #669 from Kaali/master

Fixed build on iOS and OSX
Fire EVENT_TIMER_END_SPAN a bit later

I feels more natural if the event is fired after the action's time and cycle have
been adjusted and EVENT_TIMER_KEYFRAME is fired (if needed).

See discussion on the forum: http://getmoai.com/forums/timing-of-event-timer-end-span-t1713/
Merge pull request #671 from theGoodEvil/fire_event_timer_end_span_later

Fire EVENT_TIMER_END_SPAN a bit later
Only block on busy actions

If MOAICoroutine.blockOnAction() was called with an action that was
already done or not active, the coroutine would never resume. Fixed
by only setting a blocker if it is busy.
Merge pull request #672 from theGoodEvil/only_block_on_busy_actions

Only block on busy actions
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.
Synchronize iOS keyboard events with the renderer

Otherwise the keyboard might trigger changes in the renderer, which
might crash the application because of missing synchronization.
Put rendering in a thread in iOS

Fixes input lag when accelerometer is enabled and the rendering takes
longer than the set FPS target.