SERVER-13797 Abstract $where processing and remove usages of getContext