Add virtual dtor to a couple of base classes.

Change-Id: If43a6b383ad35d644cd01d91a31e8ead751461e8
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4145
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: Nong Li <nong@cloudera.com>
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4158
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins