Potato Gratin with Leeks and Thyme