Fixed threading issue where Haxe callbacks were made on the Android UI thread instead of Haxe renderer thread.

(cherry picked from commit dfc028f73904a3878e02107ecc357bc4d0d980fd)