catch_warnings blocks more robust

Explicitely calling clean_warning_registry before with block.
Fix for #3494 
this case may be expressed as:
```python
with ignore_warnings():  # ignore deprecation warnings
    children, n_nodes, n_leaves, parent = assert_warns(UserWarning, tree_builder, this_X.T, n_clusters=10)
```
as long as any deprecation warning fires after the `UserWarning` (one disadvantage of the current `assert_warns` utility is that it is order-dependent).