Crystal and magnetic structure of hexagonal RCo4Al intermetallic compounds (R=Y and Pr)