What is the ruling on someone who eats or drinks thinking that the sun has set, then realizes that it has not yet set?
Whoever eats or drinks believing that the sun has set, then later discovers that it has not yet set, their fast is invalid, and they must make up that day after Ramadan. It is not permissible to break the fast before confirming sunset—either by seeing it, through personal reasoning, or by relying on the statement of someone trustworthy in their religious commitment.
Which is better during the day in Ramadan: reciting the Quran or performing voluntary prayers?
A Muslim should establish a daily schedule for reciting the Quran in Ramadan.
Once they have completed their daily portion (known as a wird or hizb), they can engage in other acts of worship, including voluntary prayers (nawafil). Prayer itself is called "Quran", because a significant part of it involves reciting the Quran.
Allah says: "BE CONSTANT in [thy] prayer from the time when the sun has passed its zenith till the darkness of night, and [be ever mindful of its] recitation at dawn: for, behold, the recitation [of prayer] at dawn is indeed witnessed [by all that is holy]." [Al-Isra`/78]
Is it a condition for the mosque where I‘tikaf is performed to hold Jumu‘ah prayers?
No, it is not a condition for the mosque where I‘tikaf is performed to have Jumu‘ah prayers. However, if a person vows to perform continuous I‘tikaf, and Jumu‘ah occurs within that period, then they must observe I‘tikaf in a mosque where Jumu‘ah is held so that they do not break their continuity by leaving for Friday prayer.
What is the ruling if someone wipes his head then shaves it - must he repeat it?
If a person performing ablution shaves his head after wiping it during ablution, he is not required to re-wipe his head or repeat the ablution. And Allah the Almighty knows best.