People who choose to stay in a bad relationship do so for some form of “positive payoff.” Here’s how to know when the gain is worth the compromise, and when it isn’t.