The Mathematics Behind Rakeback in Poker and Casino Games