Fix #637

A second take on a fix for #637. The previous fix broke the scenario where you pass a parented promise to WinJS.UI.Pages.render().

This fix is less intrusive, but requires some work on the part of the developer to handle errors properly. This time the error value of Pages.render() has been modified to be an object that contains a reference to the Page itself. This way you can hook Page.readyComplete yourself and handle the error later:

WinJS.UI.Pages.render(location, element, state)
    .then(function (page) {
        console.log("Pages.render complete");
        return page.readyComplete;
    }, function (errObj) {
        console.log("Pages.render error");
        return errObj.page.readyComplete;
    })
    .then(null, function () {
        console.log("Page error handled");
    });