filter: fix using only the last inserted item in in-list filter

The in-list filter used only the last line from the list file. The one test case for it contained only one line so the test passed.                                                                                                                                                      

This PR fixes that bug and contains more unit tests to cover the most frequent usecases.

Signed-off-by: Tibor Benke <tibor.benke@balabit.com>