Stocks gain after Senate passes debt ceiling bill