Stochastic modeling of cascade dynamics: A unified approach for simple and complex contagions across homogeneous and heterogeneous threshold distributions on networks.