StackContext deactivation support

Here's a pull request.

I'm not sure if it should be merged or not - any python programmer well aware that python does not do tail-call optimizations. So, any function that calls itself will consume more and more stack space.

Anyway, performance wise it is not that bad, approximately 10% slower than version without the deactivation.

Please note - I fixed gen stack_context test - it was not properly working after previous change. If necessary, I can make separate pull request just for it.

Unfortunately, there's no fast linked list implementation that allows removing elements from the middle without searching them (`deque` does not work). And doing list comprehension for each call is actually faster than do it in python.