Android Security CTS/STS hostside Oom Catcher fixes.

There's a NullPointerException due to ThreadLocal variables that got
missed, meaning every branch on or above oc-dev improperly failed tests
when oom was detected.

* Move the ThreadLocal uses to the delegating thread.
* Change the behavior of setting a test to "high-memory"
* Clean up and log device memory caching
* Fix a problem where hard reset was detected when Oom detected.
    - only was a problem when an exception occurred

Bug: 127834624
Bug: 127837702
Bug: 111403569
Test: run "oom(){ oom $1$1;};oom oom" during a test and ensure oom catcher
catches oom cleanly without hard reset detected.
Test: reboot deviced during a test and ensure hard reset is detected.

Change-Id: I87bca9e0ab5563a2b8b9bf90cfb68ff41e9ab8cf
2 files changed