Internal refactor of the thread module

    - Allocate memory on tp_new
    - Check if C object was initialized and raise RuntimeError otherwise
    - Removed unneeded GC flags and methods since these objects are not
      containers
    - Fixed leaking the underlying C objects
Created helper function poll() in test_embed