In-patient services at Edinburgh’s Astley Ainslie Hospital are to be transferred to East Lothian after health bosses said many of the hospital’s buildings were no longer fit for purpose.