Froome edges Contador for narrow victory