Add command listing.
Add $PATH expansion.
Reduce indent level.
Improve code style.
Remove duplicated command.
Tighten check of command-ness.
Add test for cargo --list.
Shorten cargo --list test code w/ some cool trait.
auto merge of #316 : xanxys/cargo/master, r=alexcrichton

Invoking cargo with new "--list" option now shows list of installed subcommands. (see #270)

p.s.
The code is less functional-style than I'd like it to be. Please let me know if there are smarter ways to write them.