Global survival of branching random walks and tree-like branching random walks