A stochastic geometry approach to coexistence in heterogeneous wireless networks