Ionic surfactants with divalent counterions