#980 Make the garbage collector run more often when under load
Description of feature:
Detect when memory usage is increasing too quickly and trigger a garbage collection at that moment, while decreasing the duration until the next collection.
When Prosody is getting a lot of requests (typically during an attack), Lua’s memory usage is increasing a lot, and this memory is never freed, resulting in a way higher usage than expected until the next restart. This would trade some CPU time during the attack against a much better handling of memory in the long term.