Cairo's 14-century mosque reopened after restoration