Fix race

Fix race in ingestion that can cause FNF,
Properly check for partitionNum
shutdown persistExecutor
hasSwapped properly check

protect check for hasSwapped.
Merge pull request #526 from metamx/fix-race-ingestion

Fix FileNotFound in realtime nodes