Enhancement: Various fixes for the activitylog service

First round of fixes to make the activitylog service more robust and reliable.

https://github.com/owncloud/ocis/pull/9485
https://github.com/owncloud/ocis/pull/9467
