build: Add warning for non-virtual destructor and fix discovered issues

Change-Id: I1d67b9b63d84d8524580e80ac06c3efef860c56a
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 1521d2a..bba2b1e 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -136,6 +136,7 @@
                               '-Wall',
                               '-Wextra',
                               '-Werror',
+                              '-Wnon-virtual-dtor',
                               '-Wno-error=deprecated-declarations', # Bug #3795
                               '-Wno-error=maybe-uninitialized', # Bug #1615
                               '-Wno-unused-parameter',
@@ -150,6 +151,7 @@
                               '-pedantic',
                               '-Wall',
                               '-Wextra',
+                              '-Wnon-virtual-dtor',
                               '-Wno-unused-parameter',
                               ]
         flags['LINKFLAGS'] += ['-fuse-ld=gold', '-Wl,-O1']