rcld: Implement graceful shutdown of rcld

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>
librcl: Fix leaking kernel_state::arg_buffer

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>