Don't check for scene changes on forced IDR frames

For the first encoded frame, is bEncCurFrmAsIdrFlag true
while bIdrPeriodFlag is false.

Previously, the scene detection code unnecessarily checked for
a scene change in the first encoded frame (where the reference
frame was an uninitialized frame), triggering valgrind warnings
about using uninitialized memory.
Merge pull request #66 from mstorsjo/valgrind

Don't check for scene changes on forced IDR frames