More 'use vars' cleanup

Move more package/global vars into our big block o'globals.  Hopefully
we can refactor these out soon (though I guess I should still think
about plugin compatibility...)
Merge branch 'fixes/perltidy' into release-4.0.0