Electronic structure, stability, and mechanism of the decohesion and shear of interfaces in superhard nanocomposites and heterostructures