[TASK] Cleanup require and require_once

* Use DIR instead of dirname(FILE) (since TYPO3 5.3.0)
* Use DIR for refering to relative paths
  to make sure the correct file is included (no search in path)

Resolves: #47205
Releases: 6.1
Change-Id: I0b78e056bfc6c281a7d1aae5928345d653e93d6d
Reviewed-on: https://review.typo3.org/19954
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Improve description of registerModule()

The description is wrong about how a new main module
is created.

Change-Id: I5bf0b793258a81b8cc89d1e9e653a9f63bbeb4f6
Resolves: #10250
Releases: 6.1
Reviewed-on: https://review.typo3.org/19965
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Fix attaching objects to a existing objectstorage

This is a follow up to "Optimize persisting a dirty objectStorage"
https://review.typo3.org/#/c/3390/
A new relation should be attached if the cleanstate relation position
is NULL instead of updating a non existing one.

Also creating new object with children attached is fixed now.

Releases: 6.1
Fixes: #47195
Fixes: #47197
Relates: #28091
Change-Id: I2a4a7602aeb8d9f4163fed36640ec830fe9ab300
Reviewed-on: https://review.typo3.org/19940
Reviewed-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer