Refactor motion estimation in MOTION_VAR experiment To get ready for pulling AV1 to nextgenv2. Refactoring is done to make the code structures similar, especially for the motion search part. Change-Id: I5d7636394408d97de55394d668540f5627827983