Characterizations of voting rules based on majority margins