Media server disco test done.

Refactoring needed to extract common code with buddycloud_server disco
into an utilitary file.