WebExternalOnly was renamed to WebFallbackToInternalAuth

Although it was caught in 21874f2c back in 2006, that commit was
accidentally reverted in 3027bf06 during a merge.

This commit applies effectively the same diff as 21874f2c.
Remove some erroneous documentation added in 702d1fd

This documentation was more of a "spec" for what was to be implemented.
I can find no evidence that the REST server code was ever updated to
support any of it.
This code was a runtime error

It now tells you something more useful if you say
rt grant or rt revoke
We should remove these methods in 4.2
Avoid warnings with undef $From
no need in this naive email check, it's wrong

IsWatcher doesn't suffer from wrong email address.

AddWatcher checks validity, whether it's RT's address
and other things.
refactor old test file and test more
replace template.t with template-insert.t

two very simple and similar test files, template-insert.t
is just better and covers more. There is nothing to keep
in template.t
minor test refactoring before we change it futher
allow to pass arguments when testing templates
rename template-simple.t to template-parsing.t

Test file has help functions to test Perl templates
as well as Simple templates. Actually it does test Perl
templates.
show how hash/array/code arguments passing fails
fix passing arrays, hashes and code into templates

It was always intention to make XXX => [...] arguments
to $template->Parse method to be available in template's
code as @XXX, but it was broken.

This is a fix, not a backwards incompatible change, as we
have GnuPG errors notification templates that rely on
such behavior.
don't skip conversion from utf8 to utf8

An email may say that it's UTF-8, but it
can contain anything else. We were trusting mail,
but there are too many MUAs, MDAs MTAs that do
things wrong.

If we don't do this conversion then at least on Pg RT fails
to create tickets with error 'invalid byte sequence for encoding
"UTF8"'.
delete exit; call from test file

Put it there for faster testing and forgot to delete
Start of documentation for the initialdata format

Incomplete at the moment, but some of the most common pieces are there.
@ACL is fully documented since I had written it previously.
Finish documenting all other data structures in initialdata files
Document RT::Queue as a valid LookupType in RT::CustomField
Improve logging for failed sender parsing in email

Starting with version 1.893, Email::Address returns undef
if passed non-ASCII email addresses to parse.

Track such email parsing failures in ParseSenderAddressFromHead and
pass them back as an optional third parameter. This allows the
caller to report the error if desired. Failure to parse one message
will generate an error, but the function can still find and return
a valid address from another header. This function is
called from several places and returning the error rather than reporting
avoids multiple warnings from parsing the same emails.

ParseSenderAddressFromHead still reports a failure to find a sender
in any header, since that is an error. That message will be reported
multiple times, one for each call to the function.

Update MailFrom.pm's GetCurrentUser to report the parse failures
as a warning. These parse failures are reported even if a sender
was found in another header. Also update the existing error in
GetCurrentUser to indicate that a parsing failure can also
prevent finding a valid sender.
Note the most frustrating current limitations of initialdata files

See also http://issues.bestpractical.com/Ticket/Display.html?id=20564
Allow simple wildcard matching in @ReferrerWhitelist

Matching behaviour is modeled on the matching of SSL certificate CNs to
domain names.