Avoid passing more than one instance of ERL_LIBS to child processes

This commit fixes issue #98 by removing the ERL_LIBS and REBAR_DEPS_DIR
from the list of environment variables exported by the rebar_port_compiler
plugin.
Incorrect REMSH args when sname is used

When a node is configured with -sname in app.config or sys.config the
REMSH_NAME_ARG and REMSH_REMSH_ARG arguments are incorrect due the
assumption that the node name always contains '@'.

To fix the bug, the script tries to find '@' and then compose the
arguments acording to node name type. If in long name mode the
script can't compose a correct node name exits with warning.
Make REMSH node run in hidden mode

To avoid problems with REMSH node being visible from another nodes
starts it in hidden mode (erl -hidden).
Allow specification of module dependencies for appups

The order in which modules, within an application, are loaded can be
important. This patch adds allows the specification of module
dependencies such that generate .appup/.relup scripts will load a
module's dependent modules before itself.

To use:

in rebar.config, add a module_deps

{module_deps, [{ModuleName, [DependentModuleName, ...]}]}.

ModuleName is the name of any module, followed by a list of module
names that it depends on.
Add missing dep examples and fix existing ones
deps: remove undocumented fossil syntax

As discussed with Martin Schut, remove support for
{app_name, "vsn", {fossil, "url", latest}.
Fix false reporting of (plain) vsn strings

rebar used to mistakenly report plain version strings like
{vsn, "1.0.0"} as follows:
DEBUG: vcs_vsn: Unknown VCS atom in vsn field: "1.0.0"

Properly detect unknown/unsupported version terms and abort
if we encounter one.

While at it, rename a variable in vcs_vsn/3 to be non-misleading.
erlc: properly reuse the right erl_opts in test_compile

Avoid getting erl_opts twice in test_compile/3, and make sure the
correctly filtered (platform_define, etc.) version is used.
lfe: use correctly filtered erl_opts
rebar_core: fix Dialyzer warning introduced in aa46d85 (#157)
generate-upgrade can now take target_dir argument

Previous generate-upgrade required renames in rel/ directory:

    rebar generate
    ...changing code...
    mv rel/<release> rel/<release_prev>
    rebar generate
    rebar generate-upgrade previous_release=<release_prev>

With the proposed changes you can now do the same without moving things:

    rebar generate # default target dir: rel/<release>
    ...changing code...
    rebar generate target_dir=<release_new>
    rebar generate-upgrade target_dir=<release_new> previous_release=<release>
Merge pull request #152 from tuncer/test-erl_opts

Fix erl_opts use
Merge pull request #172 from tuncer/dep-examples

Add missing dep examples and fix existing ones
Merge pull request #173 from tuncer/unknown-vsn

Fix false reporting of (plain) vsn strings
Merge pull request #174 from tuncer/dialyzer-fixes

rebar_core: fix Dialyzer warning introduced in aa46d85 (#157)
Switch retest dep to upstream (dizzyd/retest.git)

Now that Dave has merged all patches, it's safe to switch back to
upstream retest.
Merge pull request #185 from tuncer/retest-upstream

Switch retest dep to upstream (dizzyd/retest.git)
Make list of commands (for unabbreviation) easier to maintain

It's easier to modify the list with each command on a separate line.
The shell completion scripts have already been modified that way.
Merge pull request #179 from tuncer/commands-list

Make list of commands (for unabbreviation) easier to maintain
inttest/rgen1: increase retest timeout (30s -> 60s)

The current default (30s) causes inttest/rgen1 to timeout too often. Add
retest.config to double the timeout.