Fixes for stricter error_reporting, more updates for PHP 5.x, code cleanup

I set error_reporting(E_ALL) and went through the codebase to fix any code causing PHP warnings, notices, deprecated, and strict messages.

I also added visibility prefixes to class methods and declared static methods that were only implicitly static previously. I fixed some calls to these static methods that were using $this->. Most methods are public visibility, so adding the keyword just makes it explicit. I did mark some as private or protected after verifying how they are called in the codebase.

Finally, I cleaned up some whitespace. Spaces were converted to tabs, and closing ?> were removed since they are not necessary; they often had additional whitespace after them, which can cause problems.