Caramelized Onion and Mushroom Pie