Bug 941942 - make waitForElement allow for non DOM element, and add waitForElementToDisappear