sysrepo: shoot all sysrepo-using services upon any failure

The new sysrepo is not as robust as I would have wished for; for
example, on sdn-roadm-line, the cla-sysrepo daemon segfaults deep in the
sysrepo library upon the first service start. This is bad because it
leaves behind some of the module_change_cb subscriptions, and as a
result, it is not possible to commit changes to, say,
/czechlight-roadm-device:media-channels. As a result, the whole box is
completely unusable.

While the real fix is for sysrepo upstream to be made, there's a rather
urgent need for a workaround. The hot fix is to throw away the SHM
content, which can be only done when there's no sysrepo-using
application running. Let's solve this by relocating the sysrepo's SHM
data into an extra mountpoint (/run/sysrepo in this case), and by
several layers of systemd magic which attempt to "do the right thing"
whenever *any* sysrepo user bites the dust. Here's the idea:

- the mount is created first,
- then something dies, which triggers a restart of run-sysrepo.mount via
run-sysrepo.mount's `PartOf` statement,
- this kills everything else via that everything elses `BindsTo`
statement.

And restarting a mount service for a tmpfs filesystem indeed remounts,
which is nice because it effectively cleans that filesystem, yay.

Change-Id: I06b8491499255d7883e4fbbacd0bb04b25c2962b
diff --git a/package/reset-sysrepo/Config.in b/package/reset-sysrepo/Config.in
new file mode 100644
index 0000000..726c932
--- /dev/null
+++ b/package/reset-sysrepo/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_RESET_SYSREPO
+	bool "Override and re-init sysrepo's /dev/shm"
+	help
+	  If enabled, configure sysrepo to use /run/sysrepo instead of
+	  /dev/shm, and reinitialize that filesystem with a fresh tmpfs upon
+	  restart of any sysrepo-using service.