Check effective credentials of socket peers

Fix for CVE-2014-2905.

Code for getpeereid() on non-BSD systems imported from the PostgreSQL
project under a BSD-style license.

Closes #1436
use mktemp(1) to generate temporary file names

Fix for CVE-2014-2906.

Closes a race condition in funced which would allow execution of
arbitrary code; closes a race condition in psub which would allow
alternation of the data stream.

Note that `psub -f` does not work (#1040); a fix should be committed
separately for ease of maintenance.

Closes #1437
Change terminology in docs from 'environment variables' -> 'shell variables'
White is not identical to normal

This makes white work properly in white terminals when used for
`fish_color_*` variables. It's probably silly thing this small
mistake breaks, to be honest, but it's still a bug.
Save a memory allocation in append_formatv
Fix memory leak when displaying bind list.

This also removes duplication from the code.
Shorten compilation times

Now fish shell stores version is a small file called by other files.
This means that a slight change which modifies one file won't cause
many of files to recompile.

The compilation unit is intentionally small, this is by design. The
smaller it is, the faster it will recompile, and it will be compiled
a lot.
Fix handle leak in get_description()
Properly check for miliseconds during screen update

This removes undefined behavior in the previous code by properly
checking for miliseconds (actually typing proper names, not abusing
pointer arithmetics).
Add fish_version to Xcode project
Correctly complete redirections. Fixes #1296
Fix header name in fishd.cpp.
fishd requires fish_version.o.
Use precompiled parse files.
Simple test for completing redirections
fishd to link against fish_version.o in Xcode build
Use adjusted_pos when determining the token for tab completing
redirecitons, per #1296
Prompt sample: Debian chroot environment

When you chroot in Debian, bash shows the chroot environment in the prompt:

```bash

...

if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

...
```

This is the effect:

```
(chroot_env) user@host:~#
```

It is useful when chrooting, since usually the hostname remains the same and thus you can't distinguish where you are.
Completions added/updated.
Removed unnecessary comments.