In a 4-quart saucepan simmer reserved shrimp shells, bay leaf, and water, partially covered, 15 minutes and strain through a sieve into a bowl. Return shrimp stock to pan and keep warm. In a heavy skillet (preferably cast-iron) cook oil and flour over moderately low heat, stirring constantly with a flat-edged metal or wood spatula, until roux is a couple of shades darker than peanut butter, about 30 minutes. Stir in onion, bell pepper, and celery and cook, stirring occasionally, until vegetables are softened. Stir roux into stock and bring to a boil, stirring. Add crab legs and simmer, partially covered, stirring occasionally, 15 minutes. Stir in rice and tomatoes and simmer, stirring occasionally, 12 minutes. Transfer crab legs to a work surface. Cut shells open with kitchen shears and remove crab meat, discarding shells and cartilage. Tear crab meat into bite-size pieces and stir into gumbo. Add shrimp and simmer until just cooked through, about 3 minutes. Stir in scallion greens, cayenne, and salt and pepper to taste. Gumbo may be made 1 day ahead, cooled, uncovered, and chilled, covered.