[libcommhistory] Enable limiting for flat model queries

It's easy to limit results for queries for models which aren't using
tree mode, and limiting increases performance when the full history
isn't needed.