Former US president Barack Obama pays tribute to John McCain