Neworm modeldef js

This pull request contains the following:

1) JS model initialization
2) JS object init
3) JS createObject method (init + save in DB)
4) Also, some methods like :set, :enable are moved into C++