Deterministic sort for bundles with same id

Fixes https://github.com/substack/node-browserify/issues/711

Bundles with the same id were being kept in the some order that they were passed in, which was non-deterministic, thus the output was also non-deterministic.  This fixes that.