Create utils for perfect and bad embedding examples.
Refactor Triplet and PN Loss to have a single margin param now with
float | None. None will now set the soft_margin.
Replace basic tf.logsumexp with the TF sim stable logsumexp in the
soft margin.
Fix bug in semi-hard mining where we don't have any valid negatives >
max positive. Previously this defaulted to selecting the example in
idx 0. We now take the negative that is closest to the maximal
positive without going over, i.e., max(d(a,n)) <= max(d(a,p)).