* Fix PHP 8.x compatibility
* CollectionQuery::getIterator should have a return type Traversable
to be compatible with IteratorAggregate. Marked with the
ReturnTypeWillChange attribute to make it forward compatible.
* CollectionQuery::count should have a return type count
to be compatible with Countable. Marked with the
ReturnTypeWillChange attribute to make it forward compatible.
* Fix PHP 8.x compatibility by adding return type
* Add proper return type declarations.
* Breaks compatibility to PHP before 7.0, hence declared in
composer.json.