Added defineClass() and mapToClass() for object mapping

Now possible to map tables to classes (javascript constructors) so that
code completion is better and that the instanceof operator can be run on
returned objects and objects can be extended using
ConstructorFunction.prototype.method=...