Fix race condition in port allocation

Fix race condition in port allocation by eliminating a goroutine.  @peterbourgon @ohm @elenadeneva92 
```go
if expected, got := "7897", a; expected != got {
    t.Errorf("expected %q, got %q", expected, got)
}
```