Bug 1040603 - Add a action queue for user press actions.

The engine might not be returning a then-able. You should do `Promise.resolve(engine.click(code))` to ensure that.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve