mgr/smb: replace cross check if-block with singledispatch
The previous code relied on a cascading block of if-isintance statements
that was dense and somwehat error prone as I found out during an
experiment to add a new top level resource type. Refactor the cross
check function to use singledispatch:
https://docs.python.org/3.9/library/functools.html#functools.singledispatch
Now instead of correctly adding check function(s) and updating the
if-block, only new check functions using the register decorator is
needed.
Note that making this checking more generic is difficult as each
different resource type really has different cross checking needs.
Signed-off-by: John Mulligan <jmulligan@redhat.com>