Re-enable and fix `create-next-app` integration tests (#68084)
These tests were disabled as part of #65845, probably due to mismatching peer dependency errors. This has been resolved in the meantime.
As part of this PR we're also fixing how the tests are installing Next.js in preparation for running `create-next-app`:
The `run-tests.js` script already calls `createNextInstall` and does all the heavy lifting. Calling it again in the `create-next-app` integration tests is wasteful.
In addition, the built `next` tarball is exposed by `run-tests.js` via the `NEXT_TEST_PKG_PATHS` env variable. We need to provide the filename of the tgz as `NEXT_PRIVATE_TEST_VERSION` so that `create-next-app` uses it in the generated `package.json` as the `next` dependency "version".
With the previous approach, the installation was pointing `next` at the `installDir`, which has its own version of React installed. This created runtime errors (`TypeError: Cannot read properties of null (reading 'useContext')`) when running `next dev` in a pages project that was created with `create-next-app`.
Some of the tests were even downloading a published `canary` version of `next` instead of using the version from the current branch. This has been fixed as well.