remove Spark singleton

@ussuri 

Remove the singleton for the Spark app. It was only being used to access the analytics `tracker` instance - this has been moved to a top-level private variable. Also, some misc cleanup for the analytics code.