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.
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>
Support switch template instructions
A switch variable can have multiple values
inttest/rgen_1: double the timeout a second time

60s still seems to be too low, as it timed out for at least the R15B01
job of the timeout patch merge:
https://travis-ci.org/rebar/rebar/builds/15051701
https://travis-ci.org/rebar/rebar/jobs/15051703
Clean up rebar.config.script
Add a library template
Add command to rebar:command_names/0
Merge pull request #201 from fenollp/create-lib

Added a library template.
Merge pull request #198 from tuncer/clean-up-rebar-config-script

Clean up rebar.config.script
Merge pull request #190 from tuncer/quadruple-timeout

inttest/rgen_1: double the timeout a second time
Print a more appropriate message on 'rebar info'

To avoid treating plugins' info/2 functions as commands, we catch calls
to 'rebar info'. Previously (4b8c81fb) we simply printed the help
string, but it's much more informative to print the following:
Command 'info' not understood or not applicable
Add test for regression caused by 252b31f (#90)
rebar_core: minor comment fix
Fix regression caused by 252b31f (#90)
inttest/depplugins: update docs
Fix #187 (rename getopt to rebar_getopt)

While at it, update getopt.erl to git rev 78eda3b.