more tiny performance improvements

Don't always initialize the criteria list with default size, use a static nested class for the `or` filter, don't create a whole new class for the `and` filter.