[filter/metrics] Fix flushing in metrics filter

As discovered in #1805, metrics filter is not correctly flushing events

The current spec was calling flush manually not relying on the pipeline periodic_flusher threads, 
here is a proposal test case using the full agent to cover this case + fix to metrics filter based on the changed done to other flushing filters (multiline, spool) in #1545 
The test `it` asserts that it flushes every 5 seconds, but this test simply rejects a file with only 1 line it it. They seem to disagree on intent.