Require npm 5+ for publishing
Require npm 5+ for publishing

There are four cases we need to consider here:

1. Contributors running `npm install`
2. People running versions from the npm registry
3. People running git installs
4. Maintainers running `npm publish`

Before this change, under npm@1 through npm@4 (i.e. npms that ran
`prepublish` for times other than `npm publish`), cases 1, 2, and 4
would work as expected - in cases 1 and 4, `prepublish` would've run
the build, and in case 2 npm wouldn't run `prepublish` because the
tarball would already contain the built files. Case 3 used to work,
but doesn't(?)  anymore due to #1291.

That's all okayish, but in npm@5 - which we want to use to publish in
order to make use of some security features in the future - this gets
much messier, as `prepublish` is _only_ run for `npm publish`. This
means that scenarios 1 and 3 are broken, though scenarios 2 and 4 will
work.

This whole thing is a complete mess. There isn't really a way to
support a wide range of npm versions for all four of these cases, so
we just have to bite the bullet and make some tradeoffs.

We want to enforce npm 5+ for publishes, so introduce a `prepublish`
check that the user is on npm 5+. This will also cause cases 1 and 3
to fail on npm@1 through npm@4, but this is the only way to reliably
get the behavior we want for case 4, due to the fact that older npms
don't know about the `prepublishOnly` script (so if we checked for
older npms there, it would be pointless). It is also not _too_
horrible for cases 1 and 3 because these people are either running on
a local dev machine or _really_ know what they're doing, so they
should be able to upgrade their npm much easier than the
registry-install people.

Now that everyone is guaranteed to be running npm 5+ (else something
will blow up in a big way), we can rely on npm always understanding
the `publish` lifecycle event. So use that to invoke the normal build
machinery.

e14n/pump.io,pump-io/pump.io,pump-io/pump.io,e14n/pump.io,e14n/pump.io,pump-io/pump.io