fix segfault when running with cython coverage enabled, xref cython#2879
We have several functions getting called inside a `with nogil:` block that aren't currently declared as `nogil`.  In the future cython should warn in this type of situation (cython#2879).