Switch from `when` to `bluebird` for Promise implementation.

Bluebird is very fast.

Change-Id: I989720fc2ff24895c47fbdd52819148beefd4da4
Switch from `bluebird` to `es6-shim`/`prfun` for Promise implementation.

Use standard ES6 promises.

Change-Id: I78ffa583c77ea764152455454269151d13bb7f9d
Reorder the jpg processing steps.

Change-Id: I33ec1268564c2f9796bd3d07ebc695864d36bebf