Hillary Clinton asked her supporters to vote for Barack Obama as she formally ended her quest to become the first female president.