House prices increased year-on-year for the third month in a row in May, according to official figures.