Make EventLoop queueing thread safe on the JVM.
- Move f to static function. (better stacktraces).

This change makes it impossible to implement queueLength without locking.
Instead, I replaced it with queueEmpty.
Fix non-async platforms resolving before being initialized.
(tested with Java)

EventLoop.continueOnNextLoop() calls handleResolve immediately on some
platforms. This sometimes results in:

Exception in thread "Timer-6" java.lang.NullPointerException
	at promhx.base.AsyncBase._resolver(Unknown Source)
	at promhx.base.AsyncBase.__hx_invokeField(Unknown Source)
	at promhx.Promise.__hx_invokeField(Unknown Source)
	at haxe.lang.Runtime.callField(Unknown Source)
	at haxe.lang.Closure.__hx_invokeDynamic(Unknown Source)
	at haxe.lang.VarArgsBase.__hx_invoke1_o(Unknown Source)
	at promhx.base.AsyncBase__resolve_134__Fun.__hx_invoke0_o(Unknown Source)
	at promhx.base.EventLoop.f(Unknown Source)
	at promhx.base.EventLoop.continueOnNextLoop(Unknown Source)
	at promhx.base.AsyncBase._resolve(Unknown Source)
	at promhx.Promise.handleResolve(Unknown Source)