Testsuite fixes
These fix all failures in t/ for me, except for t/901-secure-mail-loop.t.
we'll worry about the problems this solves later, as I don't think working on the compile tests is a good use of time.
The other tests are fine, but let's not worry about the 001compile.t tests, those aren't meaningful with the current way code is loaded.
a compile test on bugzilla.pl itself (and only it) could be valid.
@dylanwh OK, this PR is again ready.
I dropped the 001compile.t fixes as discussed. The only argument in favor of keeping that test that I could find was that very occasionally, there are use statements that aren't at the top level, so potentially not every file would be compiled when Bugzilla.pm is loaded, but this didn't seem to be a common enough occurrence to worry about.
I see that ab5ce396e1f105e9552e6bea208b02e665bbb65b included some of the fixes in this PR (whether cherry-picked or recreated), so I dropped them from here too.
This leaves mojo-oauth2.t, which after re-enabling and one fix is now passing for me, and some warning fixes that weren't affecting whether the test suite is successful or not.