Move from a providing a devel static apache.conf to a rt-apache script

This allows for greater flexibility in the configuration, and some
additional cleverness.
Add a --ssl option, for https:// serving, and 100-year self-signed certs
Parse WebPort from RT_SiteConfig.pm
Factor out config parsing
Support non-empty WebPaths
Add documentation
Change =~ and !~ calls to be given an a regular expression
Fix insertion of BasedOn CF with initialdata

    BasedOn is no longer an attribute in RT4, it's a dedicated field
    that can be used at CustomField creation time.
First pass at an aliases validator
Remove a couple missed references to CSS2PIE
Make content searches in Articles case-insensitive.

Tested this with Pg to see the missing search results with mixed case
searches. The tests will show failures with Pg before the fix.
Support "partitioned" GPG mail whose bodies are transfer-encoded

Most PGP clients do not put a Content-Transfer-Encoding on inline PGP
messages, as the content of the body is already base64 encoded.
However, some clients (or MTAs enroute) may elect to do so.  As
RT::EmailParser->ParseMIMEntity is passed Exact => 1, which forces
MIME::Parser->decode_bodies(0), ->open('r') thus gets the _undecoded_
body of the message, and searches for ---BEGIN PGP MESSAGE--- fail.

Temporarily pass the body through MIME::Decoder to undo transfer
encoding before checking for the PGP armoring in inline messages.
11231ea already ensures that the decoded body is used to the actual
decryption process later, once recognition has happened.
Fix sending email with 'perl-script' mod_perl handler and 'sendmailpipe'

ef35fe5 switched to using IPC::Open2 to communicate with the sendmail
process.  Unfortunately, due to the way it is implemented, IPC::Open2
assumes that the filehandle named STDIN is always on file descriptor 0;
if it is not, the child process does not recieve the expected pipe on
its FD 0, and mail fails to be sent.  This is manifest either as a
SIGPIPE when the parent attempts to read from their end of the pipe, or
an abnormal exit code if the child exits (noting it has no input) before
that.

Apache's mod_perl, when running under the 'perl-script' handler, not
only TIEs STDIN and STDOUT, as noted in d80b1e4, but also moves them to
not be on FD 0 and FD 1.  While RT 4.0 has moved to requiring the
'modperl' handler (for more or less this exact reason), RT 3.8 is not
prepared for such.

In order to ensure that IPC::Open2 works on all deployment options,
locally override STDIN to be on file descriptor 0, regardless of what FD
0 is currently being used for.
Merge branch '3.8/open2-fileno' into 3.8-trunk
Version bump for 3.8.13rc1
Bump the FCGI dependency to one which closes FCGI's CVE-2011-2766

This commit, originally included as 8064158, fixed the dependency in
3.8.11; while it was subsequently merged into 4.0-trunk in 14eb138, this
hunk was mistakenly dropped as part of the merge.  Re-include the
change; see 8064158 for complete rationale.
Protect both FD 0 and FD 1 on mod_perl to avoid sendmailpipe errors

Under the 'perl-script' handler on mod_perl, STDIN and STDOUT are
effectively moved out of the way before the body of the request is run,
such that they always appear to be closed in the handler.
Unfortunately, the way this was done on mod_perl <= 2.0.4 was to
actually close them, while storing away the handle in a higher FD for
later restoration.  This means that, after the completion of the first
request, FD 0 and FD 1 were left available for later system calls to
obtain, as STDIN and STDOUT crept into higher-numbered FDs.

While we explicitly opened FD 1 during the first request to protect
against this sort of issue, no such protection was given to FD 0.  This
allowed it to be claimed, in the second request, by the socket to the
browser.  This causes failures in 'sendmailpipe' communication, as we
are unable to dup STDIN onto FD 0 prior to calling IPC::Open2 (see
b7a5a53).  The symptoms of this in Apache's error log varied, but
included:

  Undefined value assigned to typeglob at RT/Interface/Email.pm line 459

  Apache2::RequestIO::rflush: (103) Software caused connection abort

  (9)Bad file descriptor: core_output_filter: writing data to the network

Though these errors were only observed under the prefork MPM, there is
no known reason that they could not occur under the worker MPM as well.

Resolve this by ensuring that we always claim both FD 0 and FD 1 during
the first request.  In doing so, we replace the possibly-brittle call to
open(), where we can only hope we get the FD we want, with
IO::Handle->new_from_fd(), which allows us to specify the FD we want.

mod_perl 2.0.5 resolved this issue by never actually closing STDIN and
STOUT, but rather local'ing them to be undef; this ensures that no later
system calls will obtain them accidentally.  Forcing them open using
new_from_fd, as this commit does, does not hurt matters, however.
Merge branch '3.8/protect-fd0' into 3.8.13-releng
Correct documentation to refer to @ReferrerWhitelist, not $ReferrerWhitelist
Version bump for 3.8.13rc2