Gil releaser

This handles releasing of the gil from multiple threads.

The original was only saving one thread state globally and skipping release for any parallel threads. This one holds a single state for each thread.

I'm actually baffled why the original did it like this - it's a complete failure when calling the original releaser from a parallel thread. Any thoughts @vrabaud?