ENH: Cleanup of vectorized contains code, performance enhancements.
Refactored the cython code and released the gil.