core: use IN instead of OR in sql code to avoid "maximum recursion depth exceeded" sqlalchemy error

When amount of audit records for one object become large (more than 130) we get MMC interface "crashed" and this error in mmc-agent.log:

  File "/usr/lib/python2.6/site-packages/sqlalchemy/sql/visitors.py", line 50, in _compiler_dispatch
    return getter(visitor)(self, **kw)
  File "/usr/lib/python2.6/site-packages/sqlalchemy/sql/compiler.py", line 350, in visit_clauselist
    return sep.join(s for s in (self.process(c) for c in clauselist.clauses)
  File "/usr/lib/python2.6/site-packages/sqlalchemy/sql/compiler.py", line 350, in <genexpr>
    return sep.join(s for s in (self.process(c) for c in clauselist.clauses)
  File "/usr/lib/python2.6/site-packages/sqlalchemy/sql/compiler.py", line 350, in <genexpr>
    return sep.join(s for s in (self.process(c) for c in clauselist.clauses)
  File "/usr/lib/python2.6/site-packages/sqlalchemy/sql/compiler.py", line 217, in process
    return obj._compiler_dispatch(self, **kwargs)
exceptions.RuntimeError: maximum recursion depth exceeded

Using IN instead of OR when making queries (and lists instead of recursion) solves problem.