Add generalized query filter for access levels

Given a query, a list of valid access levels, and a field containing
access levels, return that query filtered to only contain objects
with access levels in the list.