Hierarchical tissue organization as a general mechanism to limit the accumulation of somatic mutations