Implement priority based clearsnippets.

Implement priority-based clearsnippets and add corresponding test cases (#335).
What I want to do is just a BFS.

Doing a set diff operation in each iteration is too expensive here, though I believe that there will not be too much file types.

By the way I guess the second last line is.

        checked.add(ft_to_check)

instead of `diff.add`.

However, I'll change the variable `l` to a more descriptive name: `todo_fts` and change to another more comprehensive implementation.