Fixes the bug where pants doesn't recognize build targets on top-level directories.

The previous argument parser naively simply checked whether a command-line argument contained a slash (/) or a colon (:). This is a reasonable assumption most of the time, but in the case where a BUILD file is located only one directory deep, (eg, buildroot/folder/BUILD), this makes it impossible to run pants on the target simply by calling (eg) ./pants goal bundle folder.

See github issue for example: https://github.com/pantsbuild/pants/pull/159

This fixes it by actually checking to see if a phase with goals is defined by the command-line argument. It still checks before that whether the argument contains a slash or a colon, because that if an argument has those characters it can't mean a goal. But an argument not having those characters doesn't mean it is a goal.

In a completely ambiguous situation (eg, given a command argument 'bundle', and there is a valid BUILD file at bundle/BUILD), we err on the side of the goal, and print out a warning. This makes sense, because it allows the user to disambiguate the situation using the '--' syntax.

Testing done:
Added unit tests to pants_test/commands/test_goal.py; everything passes.

Bugs Fixed 218

Reviewed at https://rbcommons.com/s/twitter/r/551/
Added support for multiple pants_support_baseurls.

Changed pants_support_baseurl to a list. Pants now goes through each url in the list from first to last, downloading the first binary with a valid url (and then breaking). This way, pants users can set their own support repo online and add it to the beginning of the list, so that their repo will be queried before the default repo on pantsbuild.github.io.

Testing Done:
Added pants_test/test_binary_util.py with unit tests to ensure old functionality still works, and new functionality will work.

Bugs closed: 244

Reviewed at https://rbcommons.com/s/twitter/r/556/
Added support for including .proto files in remote .jars on the --proto_path when compiling with protoc.

This is done by way of a new 'imports' parameter added to the java_protobuf_library target, which accepts jar dependencies as inputs. The syntax for this is:

java_protobuf_library(name='foo',
  imports=jar_sources(jar(org='foo.com', name='bar', rev='1.2.3'), jar(org='bar.com', name='foo', rev='3.2.1')),
  ...,
)

An extra ivy step called 'ivy-imports' (rather than ivy-resolve) has been added to accomodate this. It occurs after bootstrap and before codegen. The build was failing for a while on my machine due unrecognized symbols generated by protoc; this was fixed by deleting ~/.pants.d and re-running (for reasons that are still opaque to me).