Our modern default practices evolved from mountaineering, where the expectation was that you and your partner would tie in to opposite ends of the rope and stay that way all day without untying. In that context, tying the knots was a totally negligible portion of the total time spent climbing.
I'm aware of two common use cases where people tie in with a carabiner. One is when you have children or extremely inexperienced adults, and you don't want to have to teach them how to tie in and check each other's knots. Another is when you have a rope team, such as for glacier travel, with more than two people. Then anyone in the middle of the rope will commonly tie a butterfly knot and clip in with a locking carabiner.
In sport leading, mountaineering, or multipitch, one usually would not want to use a carabiner for this purpose, simply because it gets in the way, adds to the weight of your rack, and uses up a useful locking carabiner that could otherwise have been used for other purposes.
At an indoor climbing gym, doing this is probably a bad idea for a couple of reasons. (1) If the idea is to do it with inexperienced climbers who would otherwise take a long time to tie in directly, then those people may be prone to making a variety of mistakes, such as forgetting to lock the locking carabiner. Their training is sketchy, and they don't yet have it in their muscle memory. That makes it a bad idea to introduce some whole other technique. (2) The gym employees want to be able to walk around the gym and see easily from a distance that people are properly tied in. At my gym, I believe this is why they ask everyone to tie an overhand backup -- not because the backup serves any purpose (it doesn't) but because having enough tail to tie the backup knot makes it visually obvious from a distance that the figure eight was tied with a long enough tail. Any gym employee who sees you toproping with a nonstandard setup is going to have a WTF moment, and will not be able to verify whether the biner is locked.
What sort of carabiner should be used?
Any locking biner.
Would you clip it to the belay loop on the harness?
Yes.
Would a double figure-8 followed by a stopper knot be sufficient to secure the carabiner to the rope?
Normally you would just tie a figure eight on a bight. When tying into a carabiner, which can be opened or closed so that you have access to its jaws from the ends, this is an easier way to tie the same knot as a rewoven figure eight. An overhand backup is never actually of any use, and in this case doesn't serve its purpose of making it easy for a gym employee to evaluate things from a distance.
Is it safe to tie a climbing rope to a carabiner for top-roping / lead climbing?
It's safe if the knot is tied properly and the carabiner is locked. But I can't imagine why you'd want to do this when leading. Anyone competent to lead should have no problem tying in efficiently in the standard way, and I would think that the amount of clutter added by the biner would be extremely annoying on lead. In the gym, you would also be forced to pull the rope down from the climber's end, whereas most people I climb with prefer to pull it down from the belayer's end. Pulling it down from the belayer's end has two advantages: (1) you don't have to worry about hitting anyone with the rope when it falls, and (2) you can leave a stopper knot in the belayer's end to protect against the goof where the rope is too short for the wall.