Analytical Characterization of Device-to-Device and Cellular Networks Coexistence