Contextual bandits with surrogate losses: Margin bounds and efficient algorithms