TST: suppress gratuitous warnings in test_moments.py
This PR suppresses expected warnings in test_moments.py, which are otherwise distracting.

Note that the changes are not nearly as extensive as they look. I simply indented blocks of code under newly added `with warnings.catch_warnings():`.
