Ex-presidents Barack Obama and George W Bush have paid tribute to Senator John McCain at a memorial service at Washington's National Cathedral.