imem: add a string cookie so that slaves can be identified
The cookie is not secure. Depending on the master input (or other slave inputs), it might be possible for a third party to inject bad cookies. The caller shall implement appropriate sanity checks.
Showing with 30 additions and 10 deletions