https://issues.apache.org/jira/browse/AMQ-5373

Use dynamic ports for the test to avoid clashing with other brokers.
https://issues.apache.org/jira/browse/AMQ-5346

Apply patch for link detach event from @gemmellr