Fix premature gc issue

replace the internal glibc search functions with
external redblack with explicit gc support.  This
allows better retention visibility (don't carry
gc alloc'd things in malloc'd structs)