Various improvements for jsbrowser

Add APIs to get DOM elements by selector, get resources
(images/stylesheets/etc) and get image data for displayed images. Fix
waiting till the DOM is ready. Make the default timeout a per
browser-object setting.