[Encoder UT] sample UT code refactor

code approved at https://rbcommons.com/s/OpenH264/r/339/