The leader of Brazil 's ruling Workers Party has resigned amid a bribes-for-votes scandal in Congress .