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

nit: two lines