LPS-48895 add tests for Sync

Hi guys,

This is the first of two PRs regarding Liferay Sync.

In this pull request all the main Sync events are moved into a capability and wired to the repository through events.

In the next one, I'll make sure all sync events are triggered when deleting a whole repository.

Cheers