Dedupe JavaScript from the Components gem `lib`
Dedupe JavaScript from the Components gem `lib`

The `gem_layout` template from Static already has cookie functions,
header-navigation, and track click from the GOV.UK Publishing
Component's JavaScript library. Collections was including everything
from the library, so it lead to scripts being initialised twice - once
from Static and once from Collections. A result was the search toggle on
smaller screens didn't appear to work because it was being toggled open
and closed with a single click.

This dedupes the scripts loaded from the Components gem library to
ensure that they're only included on a page once.

alphagov/collections,alphagov/collections,alphagov/collections,alphagov/collections