SPARK-1830 Deploy failover, Make Persistence engine and LeaderAgent Pluggable

Could you add a class comment to this? Do note that user implementations will be instantiated with the conf as the sole constructor parameter.