Base-Class Support for meta model, database reset and type based query

Added support for derived classes from a specific base class, allows to
reset the database from code and added a query method which returns all
models of a specific type