[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 think its better to keep the Option here (and document that `defaultValue` is used when `f` returns `null`. And other places should not have to use Option. This is safer for any one to use and also minimizes the changes.