Merge "mvref_common.c: port refactoring from aom/master" into nextgenv2