The Structural Heterogeneity And Dynamics Of Base Stacking And Unstacking In Nucleic Acids