First implementation of minimal Broker API

I found hard-coded port numbers for tests are bad, since multiple tests (by multiple users) might run in parallel on the same host and then fail.