unity: set env variables for global menu

Fixes #869.
unity: fix Unity HUD (alt key menu)

Fixes #802.
unity: move hacks into profiled and autostart
unity: quote window-stack-bridge
unity: code review fixes
unity: unify common service launching code
use /run instead of /var/run as ROOT

ToT now uses /run in anticipation of a udev uprev, with /var/run
being a symlink for compatibility. fixabslinks assumes no symlink
in the CHROOT variable, so /run should be used directly when
passing paths to fixabslinks.
better setting of ROOT in {un,}mount-chroot
targets/core: Set proxy variables based on previous proxy setting

On update, obtain *_proxy variables from the previously generated
environment, and export them after sanitizing the value (to make
sure we do not eval random harmful stuff).

Fixes #883.
Merge pull request #907 from smibarber/rundir

Use /run instead of /var/run as ROOT
installer/ubuntu/prepare: detect_mirror function

Detects the current mirror.
targets/xorg: >=saucy, kernel 3.4, pin down precise mesa drivers.

On saucy onwards, if kernel version is 3.4, manually pin down old
mesa libraries from precise (mesa 8), as new ones (mesa >=9)
require kernel >=3.6.

Fixes #704.
targets/xorg: Only downgrade on non-Atom Intel chipsets
Fix check for default variable values.
unity: remove useless local in execfromconf
Merge pull request #900 from smibarber/fix-global-menu

Fix Unity global menu and HUD
targets/xorg: Remove unnecessary apt-upgrade
targets/core: Just source the new environment file from the installer

Simpler, should be safe enough.
Merge pull request #913 from drinkcat/pin-3.4-drivers

>= saucy on kernel 3.4 and non-Atom Intel, downgrade mesa to version 8 (precise)
Unit testing: add tool to import functions from scripts