Some of the flashing scripts try to be clever about picking unused ports. That's convenient for the user, so add a helper class to runner.core to accomplish similar ends portably. Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>