refactor(fleetctl): Registry bridge interface.

Use an interface between cmd and registry to test commands on isolation.
This allows to decouple the commands from the registry and do some unit testing on them.

I've ported the ssh functions that I wrote to search for machines to this interface and add a bunch of unit tests to demonstrate how it can be more clean.