There are a lot of good detailed answers on this page already, but I guess I could add my own $0.02 to the conversation and maybe a different angle to the answer..
I have been home roasting and brewing for about 2 years now and I think the #1 thing I've learned about pulling espresso shots is that it is all about consistency.
In order to effect consistency you have to control your variables, and the more variables you get control of, the better chance you have of maintaining consistency.
Over the past two years I have continuously refined my process by modifying the entire chain of coffee production, whether it meant ordering a new piece of hardware or changing how I did something.
For instance, I installed a PID on my Racilio Silvia in order to control brew temperature, I bought a naked portafilter to get better feedback on the quality of my shots, and bought a pressure gauge to make sure I was getting proper brew pressure at the group head, the list goes on and on.
So when I saw your question about "always using the same coffee" I interpreted it as just another one of those variables that you can get control of and that will effect the quality of the shots you pull.
In the beginning I stuck with the same coffee and roast to try to minimize the number of variables I was working with. Once I was more familiar with how each variable effected my shot and how I could manipulate them to get what I wanted, I began to experiment.
So I guess for me keeping the coffee the same boils down to removing some noise from the system to make it easier to manage...
Upon addition of sugar to the superheated coffee, the formation of bubbles (phase transformation) occurs because the fine particles of sugar provide sites for the heterogeneous nucleation of gas from the liquid.
When the introduction of a fine inoculant (such as sugar particles) results in sudden fizzing of a liquid, it is an indication that there has been minor superheating of that substance.
Superheating tends to occur more in microwaves than on stovetops because people use metal saucepans/kettles on the stove, while generally using glass or glazed ceramic containers when heating a volume of water in a microwave oven.
When water is heated in a glass or glazed ceramic container rather than a metal one, the very hard surface of the container means that there are few scratches on it to act as sites for the heterogeneous nucleation of gas. Fewer heterogeneous nucleation sites means less heat loss through the transformation of liquid to gas.
This university site also makes a good point about the tendency for stovetop heating to cause localised superheating in the vicinity of the container walls... However, I think that this would tend to cause more boiling due to localised heating to the point that homogenous nucleation can occur (with the homogeneously nucleated bubbles then acting as further heterogenous nucleations sites) – not because of stirring of the water.
With regard to why your bubbles remained present for the duration of drinking, I would hypothesise that this perhaps has something to do with the oils in the crema of the coffee, and/or reaction of the dissolved sugar to form something that increases the surface tension of the water. (Not sure what you would call the opposite of a surfactant effect).
A final thing I would like to mention is that (as indicated on the UNSW page), microwaving liquids has the potential to result in violent reaction, or even explosion, of the liquid — in other words, you are risking serious burn injuries by taking a shortcut to heat it up.
Adding a powder (like sugar or instant coffee) to superheated water is particularly bad because in doing so, you are introducing millions of nucleation sites at once. That said, you should also be aware that since gas bubbles themselves promote heterogeneous nucleation, simply placing a spoon in the cup can be enough to cause an 'explosion'.
If you really need to microwave a liquid, (e.g., if you are cooking something), consider heating it in a microwave-safe plastic container that has been washed a few times (and is therefore abraded on the inside). You should also stop the microwave to check the temperature of the liquid at regular intervals, rather than nuking the fluid for an excessively long time.
Best Answer
If you're using plain cocoa powder, which doesn't really dissolve, I would mix it with the coffee powder before adding to the water, and as long as the coffee powder will tolerate it, add it all to the water before heating. Mixing the two powders should help avoid clumps in the cocoa powder, and adding it early will give it time to release flavor into the water. You'll still have to stir a bit to keep it from settling out, though!
If you're using instant cocoa mix, which is sweetened and processed to make it dissolve evenly, you can just add it at the end. There's no benefit from adding it earlier, and it'll be easiest to stir and dissolve it in already hot water.