The shmemx_team_destroy function destroys an existing team. This is a
collective call, in which every member of the team being destroyed needs
to participate. This will free all internal memory structures associated
with the team and invalidate the team handle. Upon return, the team
handle is set to SHMEM_TEAM_NULL, after which it can no longer be
used for team collective calls.
It is considered erroneous to free SHMEM_TEAM_WORLD or
SHMEM_TEAM_NODE. Error checking will be done to ensure a valid
team handle is provided. All errors are considered fatal, and will
result in the job aborting with an informative error message.