tms client: contact the right TMS when you provide the machine id

A regression introduced by the zeromq backend, it always contact
the first TMS server listed in the configuration without checking
the machine id. Now it takes the first one with machine id.