client: Add function get_submodules() in base_utils

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
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>
Merge pull request #900 from ypu/modules

Two update for modules related functions