Added my first stab at native.BitmapData.threshold() function. Still has some small glitches (inconsistent results with flash's, could be optimized).
BitmapData.threshold seems accurate now, and decently fast, too!
cpp BitmapData.threshold() now passes these tests:

-Basic functionality
-Decently optimized for straight "==" palette swapping
-Returns same # of pixels changed as flash target
-Returns same visual output unless you mess with destPoint
(will figure out destPoint later)
Forgot a line!
Fixed return value on threshold(), also destPoint seems to work now
I think BitmapData.threshold() is finished now!
threshold(): Changed Int32 -> Int for Haxe 3 compatibility; Added Memory.select(null) at end of function calls.
Removed command-line.n. Not sure how that got there.
Added RealyUniqueName's Int32.ucompare() replacement. Not getting consistent visual results with it, but the logic seems right, still working...
Use separate flag for extent dirty
Dirty cache when moving children
Okay, fixed a glitch. Now it works. Running benchmarks & will update pull request with new information.
Merge pull request #72 from larsiusprime/master

BitmapData.threshold() for CPP target.
Merge branch 'master' of https://code.google.com/p/nekonme
Add template
Updates for static linking