Refactor exceptions in build_file.py and build_file_parser.py to derive   from a common baseclass and eliminate throwing IOError. Catch errors from parse errors in the BUILD file and format   context around the exception.

Followon to https://rbcommons.com/s/twitter/r/929/

Refactor exceptions in build_file.py and build_file_parser.py to derive from a common baseclass and eliminate throwing IOError.

Revive error message that prints out alternatives to an incorrect build target.

Also, Catch exceptions from parse errors in the BUILD file and print some formatted context around the line of the file that failed.

Exception message: Error parsing /Users/zundel/Src/Pants/examples/src/java/com/pants/examples/hello/greet/BUILD:
    4: java_library(name = 'greet',
    5:   dependencies = [], # A more realistic example would depend on other libs,
    6:                      # but this "hello world" is pretty simple.
*   7:   sources = globs('*.java' && foo),
                                   ^ SyntaxError: invalid syntax (<string>, line 7)

    8:   provides = artifact(org='com.pants.examples',
    9:                     name='hello-greet',
   10:                     repo='build-support/ivy:public',),
   11: )

Testing Done:
ci passed at https://travis-ci.org/pantsbuild/pants/builds/33756154

Bugs closed: 537

Reviewed at https://rbcommons.com/s/twitter/r/954/
Add tests for junit_run._JUnitRunner; fix a regrsssion in Emma/Cobertura; refactor exclusive_groups prep to base_test.

- Add test for junit_run._JUnitRunner class (specially testing against future regression in https://github.com/pantsbuild/pants/issues/508).
- Fix a regression introduced in last fix that impacted Emma and Cobertura (reported by jayeye)
- Refactor populate_exclusive_groups into base_test so tests (test_jvm_run and test_junit_run and others) can reuse it.

Testing Done:
- Travis CI: https://travis-ci.org/jinfeng/jinfeng-pants-fork - CI passed.

- Local run:

$ PANTS_DEV=1 ./pants goal test tests::

============== test session starts ===============
                     platform darwin -- Python 2.6.8 -- py-1.4.23 -- pytest-2.5.2
                     plugins: cov, timeout
                     collected 500 items
                     ...
                     ...
                     tests/python/pants_test/backend/jvm/tasks/test_junit_run.py .
                     ...
                     ...
                     tests/python/pants_test/tasks/test_jvm_run.py .
                     ...
                     ...

                      490 passed, 5 skipped, 5 xfailed in 413.71 seconds

16:45:57 07:37     [junit]
16:45:57 07:37     [specs]
               SUCCESS

Bugs closed: 508

Reviewed at https://rbcommons.com/s/twitter/r/935/