Make transaction CFs correctly limited to the correct queues

In 74e6f62, the $queues{...}++ line was moved from above the "next
unless ..." line to below it.  This changes the meaning of %queues, from
"the set of queues of the tickets listed" to "the set of queues of
tickets _changed_."  This causes the transaction CF list to be broader
than expected in most cases.

Make the transaction CFs limited based on $seen_queues, which is
computed based on all tickets listed, and remove the no-longer-used
%queues.
Add a Plugin() command for use in RT_SiteConfig.pm

This works around the awkwardness of saying "Add a @Plugins line, or
modify your existing line," and simply turns it into "Add the following
line"
canonicalize date/datetime cfs in ticket history and search results
show original text in editor when reediting

before we only show the error messages returned from server, which is bad for
user to correct.

I also tweaked error messages a bit so it won't affect the upcoming
submission, e.g. error messages from server could be:

    # Could not create ticket.
    # Foo: Unknown field

    Foo: bar

after tweaking, it becomes:

    # Could not create ticket.
    # Foo: Unknown field
    #
    #     Foo: bar

see also #22287
enable warnings globally in RT::Test as first thing

Our smoke testing system runs tests with -w flag, so
if you run tests with prove -vl with -w then you
may get different results or even failures.

Let's just enable them globally for tests.
Add docs for RT ticket feeds
Valid HTML for emailed dashboards

Commit b0ec8b3 added the opening <div> to satisfy the assumptions of
/Elements/Footer, but /Elements/Footer is not used when emailing the
dashboard due to RT::Dashboard::Mailer disabling Mason autohandlers.
This meant dashboard emails ended with the opening <div> and never
closed <body> or <html>.

Additionally the Footer and PageLayout *are* used when viewing
dashboards in the browser, so the extra opening <div> forced the footer
and remaining page content as a child of the "#body" div instead of a
sibling.

Fix this comedy of errors by properly closing the HTML document when in
email (with no footer) and letting the Footer close PageLayout's opened
"#body" div as expected when in the browser.
Failing test demonstrating incorrect MIME word decoding with quotes

Extra quotes appear around MIME words containing special chars, such as
a comma.  See [rt3 #23813].
Avoid adding too many quotes around decoded MIME words

As demonstrated by the tests in the previous commit.

This case, and much more, is handled better by
4.2-on-4.0/protect-more-chars-while-decoding-headers, but that branch is
destined for 4.2.  For now, simply check the leading and trailing
snippets around the matched word for quotes.

See [rt3 #23813].
Remove unmaintained and crippled "offline tool"

198da6f accidentally removed the ability for the "Offline" tool to be
used off of search results -- thus removing its ability to be used for
offline ticket editing, and limiting it to only offline ticket creation.
As it has a number of other notable bugs and limitations, prune it
entirely.
Move loading and calling of Module::Refresh to only one codepath
allow to delete templates with backup

If queue specific template has global template
with the same name then it should be allowed to
delete it. Scrips will use global template.
no obvious reasons to delay log initialization

It even can hurt upgrade as permissions on LogToFile file
can abort upgrade in the middle.
encryption/signing should be last thing
move setting some headers to ::Interface::Email

We were setting MIME-Version and Content-Transfer-Encoding
in Action::SendEmail. This code has some history and we should
keep it. These days we have more API to send emails besides
SendEmail scrip action, so it's good to move this code into
place which handles all emails.

See http://issues.bestpractical.com/Ticket/Display.html?id=16818
Don't output to STDOUT for successfully sent digests, by default

Most commonly, digests are sent from cron jobs, where any output to
STDOUT is sent to the administrator.  Printing on every successfully
sent digest will thus lead to the administrator getting sent daily mail
which is essentially content-less.  This might lead them to redirect the
output to /dev/null, which would cause them to be ignorant when sending
messages _failed_.

Restrict output to STDOUT to only when messages failed to send, by
default.  The new --verbose option can be used to restore the old
behavior of printing for every message sent.
Failing tests showing MakeClicky incorrectly includes trailing punctuation
Limit the Admin Queues list to 50 rows per page by default

Otherwise instances with a large number of queues take forever to load
and display (such as rt.cpan.org).
move PseudoReference to ::Interface::Email
goal is to keep 4 first and 6 last

statement was doing reverse throwing away items we want
to keep.