[Encoder] fix a calculation of fAverageFrameRate

fix a calculation of fAverageFrameRate and improve related UT

being reviewed at: https://rbcommons.com/s/OpenH264/r/915/