Former NBA star Jason Collins, the first openly gay player in a major US professional sports league, has died at the age of 47.