Pathways and kinetic barriers in mechanical unfolding and refolding of RNA and proteins.