submodule: port submodule subcommand 'deinit' from shell to C
The same mechanism is used even for porting this submodule
subcommand, as used in the ported subcommands till now.
The function cmd_deinit in split up after porting into four
functions: module_deinit(), for_each_listed_submodule(),
deinit_submodule() and deinit_submodule_cb().
Mentored-by: Christian Couder <redacted>
Mentored-by: Stefan Beller <redacted>
Signed-off-by: Prathamesh Chavan <redacted>
Signed-off-by: Junio C Hamano <redacted>