The notion that Obama and Clinton were helped by their race and gender, respectively, requires a willful ignorance of American history. In all of American history, exactly one black person ever had a remotely competitive presidential campaign. Before Obama, the closest anyone came was Jesse Jackson's failed nomination fights, and at no point did he gather enough support that people thought he had a serious chance to win the nomination, much less the presidency. Clinton is even more unusual. In all of history no woman ever even did as well as Jesse Jackson in pursuing the presidency, before Clinton. I'm not sure any woman ever even did as well as a third-place finish in a nomination fight, before she shattered that glass ceiling.
Obviously, Obama's race and Clinton's gender were each big net negatives for them. That's not to say that NOBODY voted for them for those reasons.... just that those who did were almost certainly outweighed by those who would have voted for a white man with their same positions and record, who couldn't bring themselves to support them because of race or gender.
One way to look at Obama's results is to benchmark them based on how he did with voters from races that didn't have a member of their own race in the contest: Latinos, Asians, Native Americans, Arabs, etc. What you'll find is that those coming from that racially neutral perspective saw Obama as the much stronger candidate -- supporting him over both McCain and Romney by wide margins. So, in that sense, black voters weren't unusual in the fact they also thought Obama was the better option. The unusual group were the whites, who voted for the white candidate each time.... as they have in every single presidential election in American history (and a disproportionate number of all elections). It's hard to fail to see the pattern wherein the whites ALWAYS vote for the white man to be president.