scd: Fix race conditions for release_application.
* scd/command.c (do_reset, cmd_restart): Reset app_ctx before calling release_application.
Backport of master commit: 0c1fd4e9884ed7c1edd1819762b9e8a77f606ed3
Thanks to Ben Warren for the report.
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>