client: Check the module used by status before unload it

Currently the unload_module() may failed because the module is
still using by other instance. This help our test report this
problem more clearly.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>