Add promises to the JS driver - See #1395
Merge michel_1395_promises_squashed in next