[SPARK-4537][Streaming] Expand StreamingSource to add more metrics

Add `processingDelay`, `schedulingDelay` and `totalDelay` for the last completed batch. Add `lastReceivedBatchRecords` and `totalReceivedBatchRecords` to the received records counting.
I understand the problem. Good catch, I did not realize that. How about this. Lets make two versions of registerGauge, one that takes `f: StreamingProgressListener => T` without any default value, another that takes `f: StreamingProgressListener => Option[T]` and the default value. Each version will be used accordingly.