limit the file Dstream size for each batch

Streaming scan new files form the HDFS and process those files in each batch process.Current streaming exist some problems：
1.When the number of files is very large(the total size of those files is very large) in some batch segement.The processing time required will become very long.The processing time maybe over slideDuration time.Eventually lead to dispatch the next batch process is delay.
2.when the size of total file Dstream is very large in one batch,those dstream data do shuffle after memory will be n times increasing occupation,app will be slow or even terminated by operating system.
So if we set a upper limit value of input data for each batch to control the batch process time,the job dispatch delay and the process delay wil be alleviated.
modification:
Add a new parameter "spark.streaming.segmentSizeThreshold" in InputDStream (input data base class).the size of each batch process segments will be set in this parameter from [spark-defaults.conf] or setting in source.
all implements class of InputDStream will do corresponding action be aimed at the segmentSizeThreshold.
This patch is a modification about FileInputDStream ,so when find new files ,put those files's name and size in a queue and take elements package to a batch data with totail size < segmentSizeThreshold in FileInputDStream.Please look source about detailed logic.
About the unit and the value of "spark.streaming.segmentSizeThreshold":
The unit default is Byte."kb","mb","gb","tb","pb" is supported. App will ignore this patch processing when the value is smaller than 0.The following are examples of setting "spark.streaming.segmentSizeThreshold".
conf.set("spark.streaming.segmentSizeThreshold", "2097152")
conf.set("spark.streaming.segmentSizeThreshold", "2m")
conf.set("spark.streaming.segmentSizeThreshold", "2M")
conf.set("spark.streaming.segmentSizeThreshold", "2MB")
conf.set("spark.streaming.segmentSizeThreshold", "2Mb")
conf.set("spark.streaming.segmentSizeThreshold", "2mB")
conf.set("spark.streaming.segmentSizeThreshold", "2mb")
space before `{`