[TASK] Add functional tests for discarding created elements

The workspaces API has the command "clearWSID" that reverts
elements that have been modified/created/deleted in a workspace.
The regular behavior is to keep the elements but mark it as
deleted and unset the value in "t3ver_wsid".

Resolves: #56179
Releases: 6.2
Change-Id: I55bc72add6f41449dd99f5b6b2816cd1cda3e092
Reviewed-on: https://review.typo3.org/27769
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader