apiserver/uniter: Fix TestAllMachinePorts on gccgo

Change port range related apis to return the results in sorted order.
This fixes a failing test when compiled with gccgo which was relying
on the insertion sort order of golang-go when checking results.

http://reviews.vapour.ws/r/162/