Turkish police have captured the suspected gunman who killed 39 people in an Istanbul nightclub on New Year's Day after a two-week nationwide manhunt, with state media saying he was seized along with four other suspects at a hideout in the city.