Allow tables if HTML::Gumbo is installed

HTML::Gumbo deals with ensuring that content cannot "escape" from the
context that RT frames it in, by (for example) not allowing </td></tr>
if the content has not opened its own table.  HTML::Gumbo has an
HTML::Parser-like interface, but it is not quite close enough to serve
as a drop-in replacement -- and the structure of HTML::Scrubber would
not make such a substitution easy.

As such, pre-parse the HTML content using Gumbo, if available, as a
pre-parsing step before HTML::Scrubber.  This enables <table> tags and
their ilk to be enabled without posing a security risk.
Allow additional CSS rules for borders and padding
Document that RT scrubs HTML, and note that HTML::Gumbo loosens those slightly
Set the logo attribute as the current user

This assures there is a useful LastUpdatedBy in the database
Switch the Links table to be UTF-8

This allows linking to UTF-8 URLs, such as
http://en.wikipedia.org/wiki/♨.  While altering merely the two columns
is sufficient for this, altering the table's default brings it into line
with the majority of RT's tables.

Fixes I#19338.
Warn on non-ASCII right names; mysql's RightName column is ASCII

Fixes I#19339.
Support Sphinx builds compiled with --enable-id64

Sphinx 2.2.1 and above default to 64-bit document ids, and earlier
versions shipped a compile-time configuration flag to enable them.
Create the SphinxSE table with a "BIGINT" id column, which works for
both 64-bit and 32-bit document ids.
Only include closing paren if URL included an open paren

Open and close paren characters are valid in links.  However, links are
often placed in parenthetical statements, leading MakeClicky to
incorrectly include the closing paren in the link -- which, when
clicked, is thus often a 404.

Use a heuristic to determine if a last-character closing paren is likely
intended to be part of the link or not, based on if the link includes an
open paren character.  This will allow both of the following links to
still work as their writers likely intended:

     http://en.wikipedia.org/wiki/Fish_(disambiguation)
     (something like http://bestpractical.com/)

This is, of course, a trade-off.  However, the ability to link to
http://en.wikipedia.org/wiki/) is likely not a feature that will be
missed.

Fixes #29064.
Document "Satisfy any" for the mail gateway if Apache authentication is in use
Let you Quick Create in Queues that don't define the new status

Since we don't offer Status in the Quick Create widget, we should just
let Create pick the on_create default from the Queue's lifecycle.

While in here, update RT::Ticket::Create to have less lying around what
to pass for Status (valid statuses haven't listed been in
RT::Queue in 4.0 or 4.2).

We started using the default from the Queue's Lifecycle in b206b50a,
which is the same commit where we stopped hardcoding 'new' in
RT::Ticket::Create.

Found in RTIR user since 3 of the 4 RTIR queues don't allow tickets
with the new status.
->Content is as formatted for the user, not the DB value

When comparing the canonicalized values, one must bear in mind that
->Content is not just the Content column in the database; instead, it
falls back to the LongContent, in addition to doing explicit formatting
for IP range custom fields.

Compare the 'Content' key to what is actually in the 'Content' column,
using $self->_Value().  This does not fix IP custom field updates, as
the input Content has still not been split into Content and LargeContent
as the database stores it.
Add a generic ->_CanonicalizeValue

Refactor the two places that use can() into a common method.
Move canonicalization into RT::ObjectCustomFieldValue->Create

Previously, value canonicalization happened for dates and datetimes in
RT::CustomField->AddValueForObject, and for IP addresses and ranges in
RT::ObjectCustomFieldValue->Create.  Standardize on the latter, as it is
lower down and thus harder to skip accidentally.

This requires creating the CustomField object as the current user, not
as the system user, as Date and DateTime canonicalization cares about
the time zone of the current user.  This, in turn, requires switching to
_Value('Type') instead of Type, as the constructed $cf object is not
guaranteed to have the right context objects for it to be readable by
the user.
Add common IP address and range canonicalizers

The IP address and range canonicalization in ObjectCustomFieldValue's
Create is moved into the more general canonicalization functions.  This
also allows HasEntry can split IP ranges correctly to check their
existance, and ensures that the standard form (padded to three digits
per octet) is compared against the database.
Let canonicalization return a failure message

This allows CF creation to abort on invalid values, and HasEntry to give
up and move on if passed a value that can never be found in the
database.
Provide a better error message for loading OCFVs on an invalid CF
Canonicalize all OCFVs on load, not just IP address ranges

This ensures that IPs are padded to three digits per octet, and that
dates are formatted in standard ISO time.
Remove too-many-value OCFVs by id, not Content

This merely serves to bulletproof the removal step; there is no need for
the more expensive Load with Content.
Reuse existing validation in OCVF canonicalization

Rather than reiterate the logic in the canonicalization functions, use
the error condition they return to determine the validation error.

This also opens the door for invalid date and datetime fields to abort
ticket updates, by providing a validation error if they do not parse.
For backwards compatibility, this does not enforce such.
Remove a needless block; ParseIPRange does the exact same as its first step