Deterministic ordering of port ranges in GetMachinePorts.

Fix intermittent failures in apiserver/firewaller caused by map key order dependence.

(Review request: http://reviews.vapour.ws/r/488/)