Place the tomatoes cut side up in a baking tray, add the whole garlic cloves. Season well with salt and pepper, sprinkle with the sugar and drizzle over the olive oil. Roast in a moderate oven (180C/375F/Gas 4) for about 45 minutes, until the tomatoes are lightly browned and beginning to ooze juice. Remove the tray from the oven and leave to cool for a few moments.
Pick out the roasted garlic cloves and squeeze the soft flesh out of the browned papery husks onto a saucer. Place a sieve over a bowl and rub the tomatoes through it to extract the juice and flesh. Rub the roasted garlic pulp through the sieve as well, along with any oily juices from the pan.
Tomatoes vary in juiciness and flavour, so taste the mixture and adjust the seasonings. Thinning with a little stock, or even water, may help to get the flavour and consistency you want. Remember that the flavours will be muted somewhat when the soup is chilled.
Place the bowl in the fridge and chill for at least four hours (or accelerate the chilling process by placing the bowl in a larger bowl of ice and water and stirring occasionally).
Pound together, or chop together with a large knife, the basil, garlic and pine nuts, until you have a fine grained pulp. Stir into the olive oil. This pesto is meant to be quite runny. Leaving to stand for an hour or two will mellow the harsh edge of the raw garlic.
Serve the soup by ladling into chilled bowls and drizzling a generous tablespoon of the pesto over each bowl.