[Streaming][Minor]Replace some 'if-else' in Clock

Replace some 'if-else' statement by math.min and math.max in Clock.scala

Author: huangzhaowei <carlmartinmax@gmail.com>

Closes #3088 from SaintBacchus/StreamingClock and squashes the following commits:

7b7f8e7 [huangzhaowei] [Streaming][Minor]Replace some 'if-else' in Clock

(cherry picked from commit 6e03de304e0294017d832763fd71e642736f8c33)
Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>