VM interface & factory

Adds polymorphic interface for VM objects. It will allow VM to be replaced by JitVM at runtime.
since both functions are very short, you can write the implementation here, instead of a seperate .cpp file.