Spark Integration: Custom User Metrics

Added support for emitting custom user metrics from Spark Programs.

@anew : Please review. Thanks.