##### SUMMARY
Since `add_host` and `group_by` actions only modify the runtime inventory, hosts/groups/vars added by them don't survive a `meta: refresh_inventory` call (since that call completely clears the runtime inventory). 

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
InventoryManager

##### ADDITIONAL INFORMATION
After some internal discussion, the general consensus seemed to be that this behavior is an undesirable default. The `add_host` and `group_by` actions should manage a more persistent state independent of the runtime inventory, then apply their changes to the running inventory. When a `meta: refresh_inventory` occurs, the normal dynamic inventory clear/refresh should happen, then reapply the add_host/group_by state. This should probably be the default behavior, but a config switch or a different `meta` action (or an arg to it) to emulate the current behavior could also be created if necessary.

'''
        Wait for the shared counter to drop to zero, using a short sleep
        between checks to ensure we don't spin lock
        '''
        ret_results = []
        display.debug("waiting for pending results...")
        while self._pending_results > 0 and not self._tqm._terminated:
            if self._tqm.has_dead_workers():
                raise AnsibleError("A worker was found in a dead state")
            results = self._process_pending_results(iterator)
            ret_results.extend(results)
            if self._pending_results > 0:
                time.sleep(C.DEFAULT_INTERNAL_POLL_INTERVAL)
        display.debug("no more pending results, returning what we have")
        return ret_results
    def _add_host(self, host_info, result_item):
        '''
        Helper function to add a new host to inventory based on a task result.
        '''
        changed = False
        if host_info:
            host_name = host_info.get('host_name')
            
            if host_name not in self._inventory.hosts: