Understanding how molecular interactions control the stability of concentrated surfactant formulations and their interactions with lipid membranes