Scalloped Potatoes with Caramelized Onions and Gruyere