Judge rules against Robert F. Kennedy Jr. in fight to be on New York presidential ballot, says he’s not state resident