Online Learning with Pairwise Loss Functions