Port JVET-Z0150 on memory usage log
JVET-Z0150 was proposed for ECM to log the encoder peak memory usage. It was agreed to report the memory usage in ECM CTC result template. However, whether having memory log in VTM was not discussed. I ported the related code in this MR in case we think it is also good to have it for VTM.