Add Python support code to release GIL on grab

A compile time switch WITH_PYTHON_MULTITHREADING has been added that toggles GIL
releasing.