[SPARK-4518][SPARK-4519][Streaming] Refactored file stream to prevent files from being processed multiple times