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