Enable the profiler and debug output if var/PROFILE exists.  This
provides a quick/easy way for server admins to provide profile output.
Fixes #1959.
Merge branch 'master' of github.com:gallery/gallery3