vdscli: make __getLocalVdsName more robust

vdscli attempts to guess the name of the local host by reading the
"subject" of its openssl certificate.

On Fedora 19, the order of the subject fields has changed. This patch
makes __getLocalVdsName a bit more robust, and adds a unit test for it.

Change-Id: I56bf79904cdf5d0dfcba773f096df1d3ec1670fe
Signed-off-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/16059
Reviewed-by: Antoni Segura Puimedon <asegurap@redhat.com>