Some fixes and tests for abstract base classes

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>