US home sales rose in October, notching their first annual gain in more than three years