The large-scale structure of the halo of the andromeda galaxy. II. Hierarchical structure in the pan-andromeda archaeological survey