Connectivity of Cognitive Device-to-Device Communications Underlying Cellular Networks