Run tests on PHP 8.4 and update test environment + fix nullable type deprecations
The main goal was to add PHP 8.4 support and upgrade to ubuntu-24.04. To achieve this, I had to fix PHP 8.4's implicitly nullable parameter deprecation warnings.
Since the project needs to support PHP 5.3+ and nullable types are only available from PHP 7.1+, I removed the type hints and implemented manual if-statements for type checking that work with all PHP versions and added tests to validate this behavior.
Additionally, updates to react/promise and clue/multicast-react dependencies were required, as well as adjustments to the search method using array() instead of [] syntax and modified message collection to maintain PHP 5.3 compatibility.
Builds on top of #16 and https://github.com/reactphp/promise/pull/260.