The walls that surrounds Morocco’s best-preserved medina hide a maze of narrow streets, 13th-century buildings and busy markets.