Replace when with bluebird

Currently has two commits, one for the bulk of the tests conversion and one for the rest.  Will squash if/when this is ready.
Sure.  Pipeline was only used in one place so I just left it all local to that file, but it's certainly no big deal to pull it out.