Fix aggregate of number of shuffled tuples.
Simplify the code of the aggregate test. There is no need to wrap the aggregator factory in an array.
Merge pull request #648 from uwescience/fix-aggregate

Fix aggregate
upgrade to gradle 2.2.1
Merge pull request #650 from uwescience/gradle-2.2.1

upgrade to gradle 2.2.1
upgrade jersey to 2.13, change corresponding APIs, classes, etc
simpler way to register singleton instances.
Merge pull request #652 from uwescience/jwang_upgradeJersey

upgrade jersey to 2.13, change corresponding APIs, classes, etc
Merge from master, using Jersey 2 to implement resource access authentication.

Use @NameBinding to bind the admin auth filter only to certain
resources.

If we have a request accessing a resource that requires admin:
Empty auth: UNAUTHORIZED
Non-admin user:
 Wrong password: UNAUTHORIZED (but we don't have this case for now, non-admin users don't need to provide password)
 Correct password: FORBIDDEN (currently always the case for non-admin users)
Admin user:
 Wrong password: UNAUTHORIZED
 Correct password: Pass
MasterDaemonTest: catch and throw the exceptiona instead of timeout.

If an exception was thrown in try{}, such as an AssertionError, it needs
to be exposed. Before this commit, we were simply waiting for the port
to be released in finally{} which would never happen since shutdown was
never called. To do that, catch the exception, shutdown the master
daemon, and put thread checks in finally{}.