Ionic structure of phospholipid membranes, and binding of calcium ions