Make traitlets notify check more robust against classes redefining equality and bool

Before this change, numpy arrays caused problems since comparing two numpy arrays returns an array of truth values, rather than a single truth value.  This change guards against redefining the semantics of comparison by notifying on a trait change if the equality comparison returns anything other than an explicit True value.