VM interface & factory

Adds polymorphic interface for VM objects. It will allow VM to be replaced by JitVM at runtime.
make Ext polymorphic to avoid the additional template/dynamic_cast?