CB-8154 - Fix errors adding platforms or plugins

- Added utility function to unpack a package.tgz file (gzip + tar)
- Use the new utility function when fetching plugins from the registry
- Use the new utility function when downloading platforms from the registry
- This compensates for the change in npm behaviour that no longer unpacks
  files that are added to the npm cached (change in 1.4.10)