OF-1487: Monitoring plugin: write archived data to the database more often.
Prior to this commit, archived data was kept in a buffer, which was flushed to the database once per minute.
It is undesirable to have the database 'lag behind' for such an extend period of time.
This commit introduces near-instantanious flushes. Data that's put in a buffer is flushed immediately, unless
more data is available instantly.
OF-1200: Work in progress
This is a very basic (and inefficient, and prone to cause thread starvation) change that causes
MAM queries to be responded to only after all relevant data has become available in the database.