Improved window.device code that works better on webOS, with fallback su...

...pport and fixing a deviceready issue. Important fix.

Enyo-DCO-1.1-Signed-off-by: Jason Robitaille <jason.robitaille@lge.com>