WDBS: safe check for window.localStorage

Pull request for https://code.google.com/p/selenium/issues/detail?id=7726 .
Yes we do.

Old approach is inappropriate when a new page is loaded after an alert. In this case a browser (at least Firefox) creates a new window object and loses all properties set in the old window object (including window.__webdriverAlerts property)