Modernize chocolateyInstall.ps1 scripts

This PR adapts the ps1 files to use the helpers from the latest Chocolatey release, resulting in less and cleaner code.