vp10: fix encoder crash on flush

cherry-picked from libvpx:
4f780e9 vp9/10: fix encoder crash on flush

the lookahead buffer allocation is deferred to receipt of the first
frame to allow profile changes. if the encoder was flushed before
supplying any frames the encoder would crash trying to dereference the
NULL buffer.

Change-Id: Ie0f6f7ab394f1ed5595aa9d0a49317c1dae0effc
3 files changed