sysdeps: look in C{,PLUS}_INCLUDE_PATH for headers

jhbuild itself sets this variable, but it doesn't seem to consult it
when looking for sysdeps.

For additional system library paths, it turns out that setting this
variable is a better idea than using -I or -isystem in CFLAGS because
those options are "more powerful" than C_INCLUDE_PATH which is what
jhbuild uses for pointing to the include directory in its prefix (which
should take precedence).

https://bugzilla.gnome.org/show_bug.cgi?id=725986
setup_env(): remove non-environment stuff

Remove code not directly related to setting up environment variables out
of setup_env() and into separate functions (which we call directly from
the one place where setup_env() is called).
setup_env(): remove partial_build conditions

Don't consult the partial_build variable when deciding if or if not to
include the default paths (/usr/local, /usr) in the aclocal and
pkg-config paths.

This is a leftover from the days that it was actually reasonably
possible to bootstrap yourself into a complete jhbuild world without
depending on anything on the system at all.
autotools: remove '--' GStreamer hack

This strange hack looks like it might have gotten introduced by accident
as part of e9084288cdf1e520c409ca8fb377480676e46782 which is otherwise a
completely unrelated commit.  I have no idea why this might have been
needed, but it seems very likely that if it was, it is no longer.
Drop use_lib64

Drop use_lib64 from jhbuildrc and stop using --libdir.

We now never pass --libdir= to build systems, which means that libraries
will always be installed into the default location of ${prefix}/lib.

We replace use_lib64 with a new variable called 'system_libdirs' which
is a list of system library paths.  The default value is determined in a
system-specific way which knows about /usr/local/lib, /usr/lib64 and
Debian-style multiarch directories.

We keep a few odd bits around for backwards compatibility reasons such
as the ${libdir} expansion and JHBUILD_LIBDIR environment variable.

Some examples of the detected default value on various systems:

  Ubuntu:     ['/usr/lib/x86_64-linux-gnu', '/usr/lib']
  Fedora:     ['/usr/lib64']
  FreeBSD:    ['/usr/local/lib', '/usr/lib']
config: split out 'default environment' setup

We have code in Config.setup_env() that sets up default values for some
environment variables if they are not already set.  Split this code out
of setup_env().
config: split out env_prepends handling as well

jhbuildrc can call a prependpath() function to get a path added to a
variable after jhbuild has added its own stuff.  Split this out of the
normal environment variable setup code and into its own function.
config: split environment code to separate file

Move all the code for setting up environment variables to a separate
file, outside of the Config class.

The setup_env_defaults() and setup_env() functions now each only take
one variable out of the config, each: system_libdirs and prefix,
respectively.

In addition to removing a huge chunk of code not directly related to
config file handling, this will prevent uses of other variables from the
config sneaking back into the environment setup.
config: Add an 'extra_prefixes' variable

Add an extra_prefixes variable that will instruct jhbuild to act as it
has been run inside of itself with two separate prefixes.  This allows
setting up a 'cascading' environment where you could have multiple
layers of jhbuild on top of each other (for different sets of work).

It also allows for proper handling of /usr/local on systems that install
software there (and we set 'extra_prefixes' to contain '/usr/local' by
default on those systems).

The extra_prefixes list is traversed so that the first entry has highest
precedence.
docs: fix a docbook validation error
environment: remove gconf and mono variables

Don't set the GConf and Mono environment variables anymore.

This also lets us remove a nasty hack that created a gconf config inside
of the prefix by copying values from the system.
environment: don't set ACLOCAL_FLAGS

We've been setting ACLOCAL_PATH for more than two years now and it works
with automake 1.11 and newer.
config: handle UNMANGLED_ paths consistently

Move UNMANGLED_LD_LIBRARY_PATH to the same location as UNMANGLED_PATH.

This prevents the variable from being set multiple times in the
'extra_prefixes' case.
environment: set dyld library path only on darwin
environment: fix GST_REGISTRY handling

GST_REGISTRY is not a PATH-style environment variable: it should contain
only one filename.  For this reason, avoid using addpath() on it and
just set it directly.
config: remove check for ancient jhbuild script
Don't set PYTHON

Setting PYTHON to a python2 interpreter prevents automake from being
able to find python3.
Revamp PYTHONPATH setup

jhbuild currently tries, at runtime, to detect the version of python in
use and guess an appropriate setting for the PYTHONPATH.  This variable
ends up containing a string like '.../lib/python2.7/site-packages' which
is a problem, since it is shared between python2 and python3.

We can work around this by setting PYTHONPATH to a directory shipped
with jhbuild that contains a sitecustomize hook that will dynamically
configure the correct path at runtime, depending on the newly-added
JHBUILD_PREFIXES environment variable.
environment: don't set D-Bus system bus path

This makes no sense since we're not using bootstrap anymore -- the
system's version of D-Bus will use the correct path automatically.
python path: work around a bug in a Fedora patch

The Fedora python package patches the get_python_lib() function in
distutils.sysconfig, breaking its API by returning different values,
depending on plat_specific, even if prefix is given.

See https://bugzilla.redhat.com/show_bug.cgi?id=1076293.

Work around that by checking for the different path and adding it to the
path as well.