add 'resize' method. write JS wraper.

the JS wrapper does all arguments validation, etc, and just
forwards the calls to the native module.
docs update