fix(gatsby-link) fix a memory leak in IntersectionObservers (#17056)
fix(gatsby-link) fix a memory leak in IntersectionObservers (#17056)

* fix(gatsby-link) Clean up IntersectionObserver on componentWillUnmount to prevent memory leaks

Associated issue: https://github.com/gatsbyjs/gatsby/issues/12198

* Check whether IntersectionObserver exists before unobserving

gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby,gatsbyjs/gatsby