Initial port

"brute force" port from AS3 to Haxe. Many refinements and optimizations
possible. Added rudimentary Signal port as well.