Phase transitions, double-scaling limit, and topological strings