Caramelized Onion and Apple Tarts with Gruyère and Thyme