Fix following IntraPeriod set issue
1. In WelsInitSps function, if kuiIntraPeriod is huge, uiLog2MaxFrameNum might be bigger than 15, which may introduce illegal H264 bitstream.
2. if pSvcParm.uiIntraPeriod is not zero (e.g. 14) at the initial, it will init sps.iLog2MaxPocLsb. to 5.
 But if I changed pSvcParm.uiIntraPeriod to 40, sps.iLog2MaxPocLsb. is still 5, need to recalcuted this parameter.
 (Same with uiLog2MaxFrameNum.)
Avoid using uninitialized memory in the motion estimation tests
Merge pull request #1315 from dongzha/RemoveIntraPeriod

Fix following IntraPeriod set issue
Merge pull request #1317 from mstorsjo/avoid-uninitialized-test

Avoid using uninitialized memory in the motion estimation tests