openHAB 3 runs out of memory / java heap space errors, CPU 100%+ after a few hours

Looks like it was committed and @Kai has cherry picked it for the next 3.0.x release.