Preheat your oven to 400F. Place the tomatoes, cut side up, onto two large, foil- or parchment-lined baking sheets (a shallow casserole dish will also work well). Drizzle them evenly with two tablespoons of olive oil and then use your hands to coat them well. Sprinkle them generously with coarse salt and then a pinch of black pepper. Nestle the garlic cloves in between the tomatoes. Roast the tomatoes for 50 minutes, or until they're browning and juicy. Remove them from the oven and set aside.
Heat the remaining half tablespoon of oil in a large Dutch oven or pot over medium high heat. Add the onions, along with a liberal pinch of salt and a tablespoon of sugar (if using -- the sugar will help them to caramelize and also to mellow the acidity of the tomatoes). Saute for 10-12 minutes, or until the onions are golden, adding a few tablespoons of water as needed to prevent sticking.
Add the tomatoes, along with all of their roasting juices, to the pot, along with 3 cups of the vegetable broth and thyme. Mash the tomatoes up a bit with the back of a spoon to help release their liquid. Bring the whole mixture to a boil and reduce to a simmer. Simmer, uncovered, for 15 minutes.
Transfer the soup in batches to a blender, along with the basil, and puree till very smooth, or use an immersion blender to puree it. When it's well pureed, return the soup to the pot. Check it for seasoning and add extra salt and black pepper to taste (I added an extra 1/4 teaspoon salt to the soup). Also check the soup's consistency, and add the remaining cup of broth if needed--I like a thicker soup, but it shouldn't look like marinara sauce. Finally, stir in the rice if using.
Divide soup into bowls and garnish with a drizzle of olive oil and a few basil leaves. Serve. Leftover soup will keep for up to five days, and it can be frozen for up to two months.