Analytics Cleanup

This pull request addresses several issues:

1) Cleanup Analytics.scala to support the full range of analytics.
2) Unit tests for Analytics.scala
3) Corrections to Pregel/GraphLab driven by changes in the Analytics package. 

This is still work in progress and I hope to have the rest of the Analytics.scala finished soon.