Improve NativeAllocationRegistryTest

Add a test for explicitly freeing native allocations.
Avoid assertions that are sensitive to timing where possible, and
include more information in assertion failure messages.

Change-Id: I86f0ded7330258e050573e794b49d0269360f430
2 files changed