[API] Support api in the window to capture the visible page. 

Fix #81. 

simple usage:
index.html, In the `popup.html` there is an image element whose id is `image`.
```javascript
var gui = require('nw.gui');
var win = gui.Window.get();
function takeSnapshot() {
  win.capturePage(function(img) {
    var popWindow = gui.Window.open('popup.html');
    popWindow.on('loaded', function() {
      var image = popWindow.window.document.getElementById('image');
      image.src = img;
    });        
  }, 'png');
}
```

A big patch maybe, had tested in windows and linux.