SERVER-13542: include electionId in isMaster when primary
SERVER-5700: cleanly shutdown in applier