Bug 859637: re-factored tests for unique ids to use promises.

This isn't really a fix for the intermittent failure I have no idea why that is failing, but @gozala suggested using promises instead of a naive local implementation of step()