implement FIFO and fair scheduler for spark local mode
1. Add unit test for local scheduler
2. Move localTaskSetManager to a new file
enhance pipe to support what we can do in hadoop streaming
add ut for pipe enhancement
In the current code, when both partitions happen to have zero-length, the return mean will be NaN.
Consequently, the result of mean after reducing over all partitions will also be NaN,
which is not correct if there are partitions with non-zero length. This patch fixes this issue.
update according to comments
change code style and debug info
Update LocalSchedulerSuite to avoid using sleep for task launch
Add zeroLengthPartitions() test to make sure, e.g., StatCounter.scala can handle empty partitions without incorrectly returning NaN
Move zero-length partition testing from JavaAPISuite.java to PartitioningSuite.scala
Import just scala.math.abs rather than scala.math._
update according to comments
Merge remote-tracking branch 'upstream1/master' into enhance_pipe
Merge remote branch 'upstream/master' into enhance_pipe
Merge branch 'enhance_pipe' of ssh://github.com/lyogavin/spark into enhance_pipe
refine comments and add sc.clean
Merge pull request #638 from lyogavin/enhance_pipe

Enhance pipe to support more features we can do in hadoop streaming
SPARK-781: Log the temp directory path when Spark says "Failed to create
temp directory".
Fixed the typo pointed out by Matei.
Merge remote-tracking branch 'xiajunluan/xiajunluan'

Conflicts:
	core/src/main/scala/spark/scheduler/cluster/TaskSetManager.scala