Baked gratin of cheese, mushrooms and potato