Fix package restore happening on every script recompilation in projects
Fix package restore happening on every script recompilation in projects

When NuGetForUnity is included in a user project, and they make changes
to their scripts, Unity also reloads the editor scripts for
NuGetForUnity, which will then retrigger the static NugetHelper
constructor because it is marked as InitializeOnLoad. Because this
constructor restores packages, a package restore is done every script
reload. Usually this amounts to no actual change because the packages
in question are already installed, but just checking one or two
packages this way can already slow down the script recompilation
process by several seconds, which quickly becomes tiresome.

This changes the restore to only happen once on project start-up, fixing
the issue. There was also little benefit to the restore happening, as it
didn't happen automatically when packages.config was modified, which
would have been the most useful and already requires a manual reload.

GlitchEnzo/NuGetForUnity