LPS-51358 Move workflow logic to repository level

Hey Brian,

There are 2 rough spots in this pull but they will be fixed in the upcoming future as you can see here https://github.com/adolfopa/liferay-portal/commits/LPS-51502 :

1. We have duplicated some logic in LiferayWorkflowLocalRepositoryWrapper and LiferayWorkflowRepositoryWrapper. You can see the final solution here that we will send you in the next pull: https://github.com/adolfopa/liferay-portal/commit/4438fd0129745fc6b66711dc3903ea16fd9f3a89

2. There's a method _getUserId that will be invoked only from deprecated methods and we need it to keep backwards compatibility with the deprecated methods. In this pull that method is also invoked from LiferayWorkflowRepositoryWrapper.revertFileEntry but we will fix that by adding the userId as part of the API for that method.

Let us know if you need anything in the review.

Thx

cc/ @adolfopa