[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.
How about something like `math.min(100000L * slices, Int.MaxValue).toInt`? Or even just cap `slices` with `val slices = math.min(..., 21474)`, with a comment. I know it's a demo but maybe it just makes sense to cap the value of `slices` to something much lower anyway.