cmake: Do not rebuild po and ts files if they did not change
We were always regenerating the translation files even when they had not changed yet. This makes rebuilds a bit faster.
Note: Made the target branch against kf5, but it could make sense to let it go to master. It can make sense to keep it under 5 as there's still a considerable amount of work being done there.