Filter takes a map intended to be passed along as a capability.Payload, and
pre-processes the map data to ensure that it is valid for use. This includes
removing any empty strings, lists, and maps, while ensuring that something is
available in the top-level map.