[SPARK-2715] ExternalAppendOnlyMap adds max limit of times and max limit of disk bytes written for spilling

ExternalAppendOnlyMap adds max limit of times and max limit of disk bytes written for spilling. Therefore, some task could be let fail fast instead of running for a long time if it has data skew.