Fix native allocation tracking on Dalvik.

Fixed issue where we had inverted logic when checking for
pending exceptions.

Changed the logic to not update the native allocation watermarks
after concurrent GC since the finalizers may not have been run at
this point.

Copied over the test from ART for ensuring that it is working.

Bug: 10444866

Change-Id: Ie26170f9c4703f11e993233cdc9c5f46396fca84
5 files changed