The United Nations' most-powerful body has unanimously approved a resolution aimed against jihadist volunteers who join the ranks of extremist groups.