[FEATURE] Add ObjectManager->getScope like in TYPO3.Flow

This method detects if a class is of type prototype or
singleton. We need this method as it is a dependency for
further backporting of the Flow validation api.

Releases: 6.2
Resolves: #48766
Change-Id: I4d6b043a4015c31ede0b099eebed4491a38723cd
Reviewed-on: https://review.typo3.org/21189
Tested-by: Wouter Wolters
Reviewed-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[TASK] Mark Extbase\Mvc\Controller\FlashMessageContainer deprecated

As Extbase uses the new FlashMessageService provided by the core the
old FlashMessageContainer has to be marked deprecated. Therefore also
TYPO3\CMS\Extbase\Mvc\Controller\AbstractController->injectFlash
MessageContainer has to be marked deprecated but must not throw
create a deprecation log entry.

Releases: 6.2
Resolves: #48669
Change-Id: I2583f6a72aae6ee8abc50ebd053ffc23bc74d30b
Reviewed-on: https://review.typo3.org/21166
Reviewed-by: Wouter Wolters
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler