A black man in Nevada spent six days in jail after police mistook him for a suspect with the same name who is white and twice his age, a lawsuit has said.