update-package-json: Update to explicitly include debugging data
update-package-json: Update to explicitly include debugging data

Historically we maintained `_requiredBy` and `_phantomChildren` (and others)
in `node.package` and then just past them through to disk. As those
npm now reads (versions) of those attributes directly from `node`, that
means its no longer maintaining those package attributes.

But those package attributes are super useful for debugging, so we
change this to explicitly generate them.

Also `_requiredBy` is used by the Visual Studio `npm` plugin. Yeah. =/

We also update sorting to be way more limited, to just fields we know we can
safely sort.

Credit: da39a3ee5e6b4b0d3255bfef95601890afd80709@iarna
PR-URL: https://github.com/npm/npm/pull/12775

misterbyrne/npm,misterbyrne/npm,Volune/npm,DaveEmmerson/npm,Volune/npm,DaveEmmerson/npm,evocateur/npm,chadnickbok/npm,misterbyrne/npm,DaveEmmerson/npm,Volune/npm,evocateur/npm,evocateur/npm,chadnickbok/npm,chadnickbok/npm