json-edit: Allow using stdin/stdout as json input

With this change we can use json-edit (instead of sed) inside the various
smoketest/modify-json scripts that smoketest calls.
smoketest: Add (very simple) distro detection

This should be enough to avoid doing the same test in the barclamps'
smoke testing scripts.
smoketest: Provide an install_package function

To handle the different package installation commands on the various
supported distros.