Froths, foams and heady geometry: The head on a glass of beer doesn’t look like a tough geometrical challenge. Yet the way bubbles fit together is intoxicating mathematicians, writes Denis Weaire Features