Prevent wrapped function replacement in wd

Use a local reference to wrapped functions in PromisedWebDriver to prevent
the original function from being replaced during context updates.

Fixes #126
Merge branch 'master' into geezer
Update chai dependency to 1.9.0

Fixes #84
Merge branch 'master' into geezer
Update to support chai 1.9.0 assertion API