Implement new plugin to implement callables that need to create targets

Testing Done:
https://travis-ci.org/pantsbuild/pants/builds/26734850

Local testing done too:

[tw-172-25-20-142 pants]$ head examples/BUILD
make_lib(org='com.twitter', name="test", rev="1.0")
[tw-172-25-20-142 pants]$

[tw-172-25-20-142 pants]$ git diff
diff --git a/src/python/pants/backend/core/register.py b/src/python/pants/backend/core/register.py
index 1539ca1..468d35c 100644
--- a/src/python/pants/backend/core/register.py
+++ b/src/python/pants/backend/core/register.py
@@ -61,8 +61,9 @@ def partial_path_relative_util_aliases():

 def callable_build_file_functions():
-  return {}
-
+  return {
+    'make_lib': make_lib,
+  }

 # aliases
 def target_aliases():
@@ -175,3 +176,29 @@ def register_goals():

   goal(name='roots', action=ListRoots
   ).install('roots').with_description("Print the workspace's source roots and associated target types.")
+
+
+def make_lib(alias_map, org, name, rev, alias=None, sources=True, excludes=None):
+  """A helper method to create jar libraries.
+  """
+
+  dep = alias_map['jar'](org=org, name=name, rev=rev)
+  if sources:
+    dep.with_sources()
+  if excludes:
+    for exclude in maybe_list(excludes, Exclude):
+      dep.exclude(org=exclude.org, name=exclude.name)
+  lib = alias_map['jar_library'](name=name, jars=[dep])
+  if alias:
+    alias_map['jar_library'](name=alias, jars=[lib])
+  return lib

[tw-172-25-20-142 pants]$ PANTS_DEV=1 ./pants goal list examples/BUILD::
*** Running pants in dev mode from /Users/tdesai/projects/pants/src/python/pants/bin/pants_exe.py ***
Loading pants backends from source
examples/BUILD:test
[tw-172-25-20-142 pants]$

Bugs closed: 185

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