Grain boundary ensembles in polycrystals