RF: fix reference cycle in interp1d; add gc utils

interp1d was keeping references to self via a reference to one of its
methods, preventing it being cleared from memory without garbage
collection.

* add test for circular reference in interp1d
* add garbage collection utilities
* remove circular reference in interp1d