pass node-main to WebKit initializer

Fix rogerwang/node-webkit#1989
fix build warnings
Fixed issue #1973
https://github.com/rogerwang/node-webkit/issues/1973
Some attributes should be available even after the frame is destroyed.