[BUGFIX] Fix bad preconditions for PackageStates migration

The PackageStates.php file migration from LocalConfiguration.php happens
transparently upon the first call of the install tool. If the file
LocalConfiguration.php is not available yet, like during installation
from a blank package this step fails.

This patch introduces some more checks that check if typo3conf and
LocalConfiguration.php are present before the migration of PackageStates
kicks in.

Resolves: #52847
Releases: 6.2
Change-Id: I5dede4123ad1474c0493c85d96350fd6cfdc04c4
Reviewed-on: https://review.typo3.org/24793
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik