John Edwards endorses Barack Obama