core: check if duplicate storage connection exists

Check in Add/Update storage connection whether
a duplicate storage connection already exists.
The check was already present only for file domains in AddStorageConnection
command, and now it is expanded to check for block domains as well,
and is also used now by the UpdateStorageServerConnection.
Also moved the code to a parent command to allow code reuse,
and added corresponding unitests.

Change-Id: I0cfc642c49ab4fc482c5d1fabc28fad0ae79d2f4
Signed-off-by: Alissa Bonas <abonas@redhat.com>