Correctly use NativeAllocationRegistry for native objects

For native objects registered with NativeAllocationRegistry, call the
native free function to release the memory.

Bug: N/A
Test: layoutlib tests
Change-Id: I492c607335d1011126a725cb0a876b7866ebab61
5 files changed