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.
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
Add docs for RT ticket feeds
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
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.
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).
extract our code that fetches table names

keep function private, so far we use it in upgrade
scripts and tests.
require newer DBD::Pg on Pg 9.2 for upgrade

We use DBI's table_info method in upgrade scripts.
It fails on Pg 9.2 with old DBD::Pg driver. We don't
have to bump required version for all Pg users, but
can help users of Pg 9.2 to solve the problem by
providing better error message.
Fix uninitialized value warning in RT::Principal::HasRight

HasRight was storing the cananicalized value of a passed-in Right
argument back in the argument hash, so the debug log output on an
invalid right had an uninitialized value rather than the invalid right
argument.

Use a temporary variable to store the canonicalized value, in case
canonicalization fails and we need access to the pre-canonicalized form.
Tests for right name canonicalization

Tests inserting into the database and pulling back out of the database.
Note that as RT::User->Load is used, the user/email must already exist
If __check_user returns false, attempting to use that value in a warning is pointless

Store the original user or group, and use that value in the warning.
Refactor rebuilding table attributes into a method
Rebuild record attributes after loading plugins

Plugins may provide _LocalAccessible methods in an attempt to modify
which attriutes are public.  However, as InitClasses() is called prior
to InitPlugins(), the _BuildTableAttributes call is too early to be
affected by plugins' changes.

Add an additional _BuildTableAttributes call after plugins are loaded.
In order to preserve the previous behavior, do not remove the previous
callsite.  Otherwise, code which called InitClasses directly would not
have a working set of classes, and load-time code in plugins would not
be able to use the core classes' SearchBuilder-constructed methods.
Only iterate through User objects with HomepageSettings

Otherwise, we make a query for the attributes of every user in the
system, one at a time.
Update by running adding boilerplate marker and running devel/tools/cmd-boilerplate
Remove two BEGIN blocks that were improperly marked with the boilerplate marker

They only survived because of a lack of /g in devel/tools/cmd-boilerplate
Allow CustomFieldLookupType to be called as a class method

(cherry picked from commit 1ff3f2b0a97d1e336ced7542ce2b0201ff5309fc)