A binary-tree based model for rate-independent polycrystals