fix get loss error when it not a scalar and fix process specified data
failed when the action is False, and collect_specified_data parameter is
not None
Before, we only decide whether to collect data by current step,
it will not work well in dataset sink mode, so we check to see
if it's a dataset sink mode, and decide whether to collect data.
I added a SummaryCollector to help users automatically collect information
such as the network, loss, learning rate and so on, making it easier to collect this information.
It also can collect train lineage and eval lineage information which is
collected by TrainLineage Callback and EvalLineage Callback in
MindInsight.
I also add some UT for SummaryCollect to keep the code correct.