Traq 3 and PHP 8

I've been working on improving support for PHP 7/8 while working on Traq 3.8.

I'm happy to announce that I will be back-porting all these improvements to Traq 3.7 over the next few days with another Traq 3.7 release shortly after.