[BUGFIX] Assume pid 0 for global backend context

If outside from "Web", extbase modules try to figure out some pid,
while in reality there is just none. The core takes "0" in this
situations, for looking for typoscript templates and tagging
cf_cache_pagesection entries.

To enable extbase to use the core's cache entries, we should streamline
this.

* Return 0, if no pid is set
* Remove needless unit-tests

Resolves: #54813
Releases: 6.2
Change-Id: I58cbaac0b40323e1766229488973b775accd1b97
Reviewed-on: https://review.typo3.org/26675
Reviewed-by: Oliver Klee
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring