Fix CMFCategory test in Python 2.
- The warnings are compared in a set instead of a list, as we do not care of how many times is the warning raised.
 - The warning filter is added inside the context manager, as recommended in https://docs.python.org/2.7/library/warnings.html#testing-warnings .
 - We change the 
clearmethod of list, usingdelinstead, as theclearmethod was added on Python 3.3. 
Local tests pass and a test suite is in progress.