Decomposition of group-valued and [0,oo]-valued measures on Boolean rings