I believe garlic and onions are in fact poisonous in very large quantities. However, for humans these quantities are unfeasibly large and so we are generally safe. I know dogs and cats are affected much more -- I read of a dog which died from quite a small amount of onion soup.
They are also irritant when raw, and I suspect this is what has affected you, Alej.
I've had various dishes with dozens of whole cloves in -- but cooked. One was roast hare -- I think this was really a chicken recipe, perhaps a similar dish to Inferno's. Mine was a Persian one I think.
Another Middle Eastern one is fresh herrings or sardines, roasted with pine-nuts and whole garlic cloves.
A good barbecue thing is new potatoes triple-wrapped in foil with oodles of butter or olive oil, some salt and pepper and loads of whole cloves with their skins on. Roast in the embers, or (quicker) bake in the oven first. The garlic cooks to a delicious pulp -- you hold the skin and suck out the pulp with your teeth. Yum!