Fix some PHP 8 fatal errors
This update includes fixes for the following errors:
Call to undefined method Comment::comment()
Call to undefined method screenshot::screenshot()
Non-static method maintainer::versionHasMaintainer() cannot be called statically
Non-static method vote::getVotesForVersion() cannot be called statically