Add virtual destructor to a class with virtual functions.

Clang is not happy about it, emits a warning on -Wall. Technically it's not
required if you never call "delete" on a base class pointer. But it's a good
practice to define a virtual destructor at a point where virtual table is
also defined (implicitly by defining virtual functions).
Actually silence warning. A cast to (void) does so, not to (void*).
Support building with clang.

Sadly CMAKE_COMPILER_IS_GNUCXX is not true if building with clang. Even though
clang is mostly compatible with gcc.

P.S. A proper way to build stuff using clang under cmake is:
     CC=clang CXX=clang++ cmake . <options>