ANDROID: fix -Wdelete-non-virtual-dtor warnings

Partial backport of JDK-8182657 with additional fixes.
Clang 5.0 emits a ud2 instruction to deliberately SIGILL when
deleting a pointer to an abstract class with a non virtual
destructor.

Based on I67b7ebdb9c4b7c6acc3139042d972f56732bd25c with more
fixes to allow enabling -Werror=delete-non-virtual-dtor.

Bug: 69449598
Test: m -j on mac with prebuilts built with clang 5.0
Change-Id: I22c12bca1fb19e03017c69040958b60b2d64ee4f
19 files changed