[SPARK-4033][Examples]Input of the SparkPi  too big causes the emption exception

If input of the SparkPi args is larger than the 25000, the integer 'n' inside the code will be overflow, and may be a negative number.
And it causes  the (0 until n) Seq as an empty seq, then doing the action 'reduce'  will throw the UnsupportedOperationException("empty collection").

The max size of the input of sc.parallelize is Int.MaxValue - 1, not the Int.MaxValue.
Why Int.MaxValue - 1? I believe (1 to Int.MaxValue) will just work fine.