[2.6] Added support for Service Discovery in Spark

@anew: Please review. Thanks.

Build running here: https://builds.cask.co/browse/CDAP-DUT109-3


Implements `Externalizable` instead.