Does Negative Sampling Matter? A Review with Insights into its Theory and Applications