BUG: Fix memory leak in Rolling.min and Rolling.max (#25893)
- [x] closes #25893
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

This fixes an issue that caused a memory leak in `window._roll_min_max`.  Apparently, when you pass an ndarray as an argument that you `cdef`ed in the calling function, that memory never gets released.  This is not an issue unique to pandas, as evidenced by [this stackflow question](https://stackoverflow.com/questions/29247373/memory-leak-calling-cython-function-with-large-numpy-array-parameters).  It may be a numpy bug.

There are a few potential fixes for this:
- Moving everything into one function
- Pass pointers to the functions
- Use [memoryviews](https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html#memoryviews)

As memoryviews is the least disruptive change and is just as performant as what was already being used, that's what I went with for this fix.

I did not add a test with this PR, as determining memory usage is platform specific (and rather wonky) unless you use a library like `psutils`, and even with that may have problems.