rebar_eunit:reset_after_eunit/1 mustn't remove 'included_applications'

One could argue that rebar_eunit does some pretty dangerous stuff when
trying to clean up after a test run, but specifically, it tells the
Application Controller to delete everything returned by
application:get_all_env(App). Unfortunately, included_applications
also goes, which can lead to a crash in application_controller, if
the application is subsequently unloaded.

This patch attempts the smallest possible fix: remove all env
variables except included_applications.
Add standard xref checks and improved suppression

* Allow the following predefined analyses :
   undefined_function_calls, undefined_functions, locals_not_used,
   exports_not_used, deprecated_function_calls, deprecated_functions

* Trap some possible errors in case module information is not
    available

* ignore_xref works on all checks and can take {M,F,A} tuples.
  (Automatic behaviour export suppression still only works on
  exports_not_used)
External deps_dir should have higher priority than the config one

The external deps_dir should have higher priority because
it is used by scripts and other build tools to set up the
location of the dependencies. This commit ensures that,
even if a project has set deps_dir in its config file has
lower preference than the command line one.
Merge pull request #100 from josevalim/patch-1

External deps_dir should have higher priority than the config one
Merge pull request #47 from uwiger/master

rebar_eunit:reset_after_eunit/1 mustn't remove 'included_applications'
Merge branch 'xref_20130130' of git://github.com/spilgames/rebar into spg-xref

Conflicts:
	src/rebar_xref.erl
rebar_ct: fix Dialyzer warning caused by bcc57e9b

Also fix a single line exceeding max column.
rebar_core: fix consistency issues caused by 252b31f

- refactor plugin dirs code to be simpler and easier to read
- use erlang-mode's default (%%) comments for portability/consistency
- make sure erlang-mode's indenter is used so that a future whole
  buffer indent doesn't get messed up
Delete dialyzer_warnings on 'make distclean'
Update THANKS file
rebar_xref: fix regressions introduced in a5be40c96

- restore support for "rebar help xref"
- simplify new/changed functions by breaking out code or
  using simpler syntax where applicable