To prepare ham hocks, stud onion with cloves. Place onion, water, and next 8 ingredients (water through thyme sprig) in a stockpot; bring to a boil. Reduce heat; simmer 3 hours. Remove hocks from stock. Strain stock through a sieve into a large bowl; discard solids. Cool stock to room temperature. Cover and chill hocks and stock separately 8 hours or overnight. Remove meat from bones; finely chop. Discard bones, skin, and fat. Skim solidified fat from surface of stock; discard fat. Reserve 4 cups stock.
To prepare beans, sort and wash beans; place in a large Dutch oven. Cover with water to 2 inches above beans. Cover and let stand 8 hours or overnight. Drain.
Combine beans and reserved stock in a Dutch oven. Add chopped thyme, fennel seeds, marjoram, and tomato; bring to a boil. Reduce heat; simmer 1 hour and 15 minutes or until beans are tender.
While beans simmer, heat oil in a nonstick skillet over medium heat. Add leek bottoms, chopped onion, 1 cup carrot, 1/2 cup celery, and 2 garlic cloves; cover. Cook 10 minutes; stir occasionally. Add vegetable mixture, ham, ground pepper, and salt to bean mixture.
To prepare garnish, combine parsley, basil, and green onions; sprinkle over bean mixture.