Implement priority based clearsnippets.

Implement priority-based clearsnippets and add corresponding test cases (#335).
that seems pretty convoluted.... How about:

~~~python
seen = set(root_filetypes)
checked = set()
while True:
   diff = seen - checked
   if not diff: break
   ft_to_check = diff.pop()
   seen.add(ft_to_check)
   diff.add(ft_to_check)
   seen += set(self._extends[ft_to_check])
~~~~