Refactor content fetch condition in ApiQueryRevisionsBase

Use a member variable to make the ifs easier to maintain.

Change-Id: I535740094708c563298a8b8d34027519d3900758
Merge "Refactor content fetch condition in ApiQueryRevisionsBase"