Don't leave is_block in bad state after bad redirection

Fixes #1728.
Expunge INTERNAL_BLOCK from the codebase

It's a relic of the old parser, and isn't used anymore.
Base `status -b` off the parser execution stack

Instead of globally marking the state as "in block" when evaluating
blocks/functions, update the "in block" status when pushing/popping
blocks on the parser stack.

Fixes #1729.

On a side note, `status -b` is actually pretty useless, because it
always returns 0 inside of a function (even without this patch).
Create and use $DATADIR/vendor_completions.d/ for upstream completions

Closes #1485.
fish.pc: add pkgconfig file for fish

Assists other packages in finding the path to install completions: call
`pkg-config --variable=completionsdir fish` or so (like
bash-completion).

As discussed in #1485.
Export $HOME if we have to calculate it

If $HOME is unset in the environment, fish calculates it with
getpwnam(). However, it wasn't being exported. Just like the $USER
calculation, $HOME should probably be exported, because everyone will
assume that it's an environment variable (as opposed to an unexported
global variable).
Find fishd file even when $HOME is unset

env.cpp sets up $HOME based on the current user, if it's not inherited
from the environment. fishd_get_config should be using the same
calculated value of $HOME. To that end, move universal variable
initialization to after $HOME is set up, and read the value from the
fish environment instead of using getenv().

Fixes #1725.
Added fish_preexec and fish_postexec events

Fixes #1549.
Fix doc example for `echo`
Tweak lexicon_filter.in for GNU sed
Fix examples in `bind` documentation
Minor tweaks to initial keybinding load

Remove comment that AFAICT is not true anymore.

Ensure someone setting __fish_active_key_bindings as a universal
variable doesn't screw up the initial keybinding load.
Rewrite fishscript testrunner for better output

Update the fishscript testrunner to use the same output style as the
interactive testrunner.
# This is a combination of 2 commits.
# The first commit's message is:

Simplify default fish_prompt

No need for the set_color caching now that it's a builtin.

Also simplify the 3 classic prompts in fish_config's sample_prompts set.
Use ENV_USER with vars set via `function -a`

ENV_USER is intended to be used when setting any variable whose name is
controlled by the user. The names given to `function -a` certainly
qualifies. This wasn't an issue in practice because the only restriction
ENV_USER imposes is also imposed on ENV_LOCAL, but the rules may change
in the future.
Add new `functions` flag -V/--inherit-variable

--inherit-variable takes a variable name and snapshots its current
value. When the function is executed, it will have a local variable with
this value already defined. Printing the function source will include
synthesized `set -l` lines for the values.

This is primarily useful for functions that are created on the fly, such
as in `psub`.
Update psub for the new --inherit-variable flag

Also do some minor formatting cleanup, make psub return 1 when executed
outside of a command substitution, and make it respect $TMPDIR.
Clean up prompt_pwd with the new function -V flag

Also fixes `cd /private` displaying as no path on OS X.
Prevent STDERR leak from abook detection in mutt completion

Fixes #1737
Merge branch 'master' into docopt