refactor Sps generation
Merge pull request #1542 from sijchen/review

[Encoder] refactor Sps generation: passed review at https://rbcommons.com/s/OpenH264/r/930/