As Muslim institutions of higher learning, the madrasa had the legal designation of waqf. When did the al-Qarawiyin officially become a university?