add global flag to install instructions

The website gives install instructions for packages. However, these instructions do not advise to use the global flag (`-g`) for packages that prefer to be installed globally. I suspect that this leads to usability issues and packages being installed incorrectly.

This merge request would add the global flag to install instructions for package pages where the `preferGlobal` flag is set. The test for determining whether the flag is set is the same as used by npm itself.

For example, the [Cordova][1] package page gives install instructions as:

    npm install cordova

The change would display the install instructions as:

    npm install cordova -g

[1] https://www.npmjs.org/package/cordova