allow extra app dependencies for yaws.app to be configured

Yaws can depend on crypto for random numbers and hashes, and on the
compiler for .yaws pages. But the default yaws.app file specifies only
kernel and stdlib as application dependencies, since not all Yaws
deployments use crypto or compiler. Still, if a Yaws system uses crypto and
compiler without including them in the yaws.app file, building and
deploying an Erlang/OTP release for that system will fail.

Add --enable-crypto and --enable-compiler options to the configure script
to allow the user to add either or both of these applications to the
yaws.app file. Specifying the --enable-crypto option also causes the Yaws
startup code to start the crypto application; likewise for
--enable-compiler and the compiler application.

For rebar builds, enhance rebar.config.script to generate the same files
the configure script generates for any extra app dependencies. Setting the
YAWS_APPDEPS environment variable to a space- or comma-separated list of
addition applications to add to yaws.app, e.g.

YAWS_APPDEPS='crypto compiler'

causes rebar to add those apps to the generated yaws.app file and ensure
they're started before Yaws started.
allow a cleanup pid with replace_cookie_session

Add yaws_api:replace_cookie_session/3 and
yaws_session_server:replace_session/3 to allow the user to pass a cleanup
pid in order to associate a new cleanup process with the replacement
session. Thanks to Patrick Moy for suggesting this.
update priv/mime.types from Apache
scripts/Install: Create ${etcdir}/rc.d on FreeBSD

If Yaws is installed in a non-standard directory, we must create
${etcdir}/rc.d before copying the init script there.
Merge pull request #174 from yakaz/install-freebsd

scripts/Install: Create ${etcdir}/rc.d on FreeBSD
Accept an IPv6 between "[...]" as an fcgi server hostname

Here are some examples:
    php_handler = <fcgi, [::1]:9000>
    fcgi_app_server = [::1]:9000

The square brackets syntax is already used in URLs (http://[::1]:8080/)
and allows to mix an IPv6 address and a port number.

While here, fix a bug in revproxy URL parsing where IPv6 between
brackets were considered as a syntax error.
Add a nslookup_pref global parameter

This parameter allows to change the name resolution and connection
preference for fcgi servers and revproxy URLs. It takes a list of the
form [inet | inet6].

For instance, to perform only IPv4 resolution:
    nslookup_pref = [inet]

To perform both IPv4 and IPv6, but try IPv6 first:
    nslookup_pref = [inet6, inet]

The default value is [inet]. Therefore, the behavior remains the same
with this addition.

This parameter is used by two new functions:
    o  yaws:tcp_connect/{3,4}
    o  yaws:ssl_connect/{3,4}

They are wrappers around gen_tcp:connect/{3,4} and ssl:connect/{3,4} and
take care of connection retries for each configured family.
Merge pull request #175 from yakaz/fcgi-ipv6

IPv6 address parsing + IPv6 lookup for FastCGI and reverse proxy