[SPARK-3325] Add a parameter to the method print in class DStream.

def print(num: Int = 10)
User can control the number of elements which to print.

It matches the original logic, which takes 11 in order to print 10. If there are 11 elements, it prints "..." at the end to indicate there is at least one more that is not printed.