Completely random measures for modelling block-structured sparse networks