Thun, Leo gróf (1811–1888), 1849–1860-ig osztrák vallás- és közoktatásügyi miniszter