perf: remove all cgo handles (#1073)
* Removes Cgo handles and adds phpThreads.
* Changes variable name.
* Changes variable name.
* Fixes merge error.
* Removes unnecessary 'workers are done' check.
* Removes panic.
* Replaces int with uint32_t.
* Changes index type to uintptr_t.
* simplify
---------
Co-authored-by: a.stecher <a.stecher@sportradar.com>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>