In both cases, the result is the same: the new control effect overrides the old one. This is because Magic uses a timestamp system: whenever there are effects that modify the same thing (like control, or type, or color), the one that was created last and hasn't ended determines the final result.
This is part of rule 613: Interaction of Continuous Effects:
613.1. The values of an object's characteristics are determined by starting with the actual object. For a card, that means the values of the characteristics printed on that card. For a token or a copy of a spell or card, that means the values of the characteristics defined by the effect that created it. Then all applicable continuous effects are applied in a series of layers in the following order:
- 613.1b. Layer 2: Control-changing effects are applied.
613.2. Within layers 1-6, apply effects from characteristic-defining abilities first (see rule 604.3), then all other effects in timestamp order (see rule 613.6).
613.6. Within a layer or sublayer, determining which order effects are applied in is usually done using a timestamp system. An effect with an earlier timestamp is applied before an effect with a later timestamp.
613.6a. A continuous effect generated by a static ability has the same timestamp as the object the static ability is on, or the timestamp of the effect that created the ability, whichever is later.
613.6b. A continuous effect generated by the resolution of a spell or ability receives a timestamp at the time it's created.
Please note that these rules do not describe a sequence of actions to take, but rather a process to determine the current characteristics of an object. Also, timestamps don't really have a "value." The only important thing is what order they are in.
All of the effects discussed here are continuous effects. That is because rule 611.1 says
A continuous effect modifies characteristics of objects, modifies control of objects, or affects players or the rules of the game, for a fixed or indefinite period.
So, here's how we determine the controller in each of your situations:
Your Control Magic has a static ability that says "You control enchanted creature." This creates a continuous effect that causes you to control the creature with a timestamp corresponding to when the Control Magic entered the battlefield (613.6a). Then you activate your Djinn's ability. When the ability resolves, it creates a continuous effect that says that your opponent controls that creature (and one that says that you control one of your opponent's creatures, but that's not relevant), with a timestamp corresponding to when the ability resolves (613.6b).
Then, when we want to determine who controls the creatures, we see that there are two control changing effects. We apply them in timestamp order, so we first apply the Control Magic effect, which says that you control it. Then we apply the Djinn's ability's effect, which says that your opponent controls it. The end result is that your opponent controls it.
If the Control Magic ever goes away, the Djinn's ability's effect will be the only control changing effect. It says that your opponent controls the creature, so they control it.
First, your Rubinia Soulsinger's ability creates an effect that says that you control the creature, with a timestamp corresponding to when the ability resolved. Then your Djinn's ability creates an effect that says that your opponent controls the creatures, with a timestamp corresponding to when that ability resolved.
Then, when we want to determine who controls the creatures, we again see that there are two control changing effects. As in case 1, we apply the effects in timestamp order. This means that we first apply Rubinia's ability's effect, then your Djinn's ability's effect. And, as in case 1, the result is that your opponent controls the creature.
If you then decide to untap Rubinia, there will then be just one control changing effect: the one that says that your opponent controls the creature. So, they control it.