Sweet Potato Gratin with Caramelized Onions