COMPAT/TEST test, fix for unsafe Vector.resize(), which allows refche…
closes issue #15854, supersedes pull request #16224, #16193 

Adds a test showing how the ``uniques`` attribute leaks to user space, and calling ``get_labels()`` again with different data could change the underlying ndarray. With this pull request an exception will be raised after calling ``append()`` after calling ``to_array()``, which makes the test pass. It also allows addition of the ``refcheck=False`` kwarg to ``ndarray.resize()``, which fixes the issue above.