A little science can save your ice cubes from melting quickly—and it’s easier than you think.