AbstractUIDetails: use identifier in getTitle

If there is a unique identifier string for the object (i.e., it
implements the Identifiable interface), and none of the more
friendly options are set (i.e.: no label, no menu leaf, no name),
then let's use the identifier over the raw class name.
ShadowMenu: compare objects using MiscUtils

This is easier to read than doing all sorts of null checks.