Fix segmentation fault when encoding all keyframes (kf-max-dist=0).

The issue was that:
- We call av1_setup_pre_planes() when this is not an intra-only frame,
but,
- But, we do motion vector search for any frame other than first frame
Doing both of these only when this is not an intra-only frames makes
logical sense and fixes the crash too.

This also avoids doing motion search for intra-only frames in the first
pass.

Verified that there is no change in compression performance for video,
as well as when forcing all keyframes.

BUG=aomedia:133

Change-Id: I7b18c0568eaa29c6c97f31f226243e5a9dbaecf1
1 file changed