Variability analysis

Refactor code common to ExecInsertIndexTuples and ExecLockIndexTuples into new
function, ExecCheckPartialPredicate.