Merge the get_available_resource() and get_host_stat()

For better report the host status, I would like to merge the code
for get_host_stats() and get_available_resource(). As most of them
are similar, merge together to easily manage the code.

Change-Id: I3b277ae5a9b5e3c9ea1a73bd9a5120ea785995f5
Closes-bug: 1387089