Population Learning in Random Games with Endogenous Network Formation