Adding common conditions for explicit waits in WebDriverJS

Similar in concept to ExpectedConditions from Java:

    driver.wait(until.elementLocated(By.id('foo'), 2000)
        .then(function(el) { el.click(); });
    driver.wait(until.titleIs('Hello, world!'), 5000);

Fixes issue 5855