How is it possible to detect a single photon without making any change to it?
In general, if you have detected a photon in your experimental apparatus, you have changed it drastically. It may have disappeared completely, as in this bubble chamber picture:
The colored diagram shows the photon in the picture that has materialized into an electron positron pair. How to we know there was a photon( the yellow line) when it does not leave a trace in the chamber? Because we know that it started from an electron interacting with the liquid in the chamber: the curly bit is the electron that has given most of its energy to the photon.
In general in particle physics if you detect a particle, you have disturbed it, except if you detect it as a missing energy and momentum and can thus identify its mass.
How does observation is related to the total energy of a system and does the act of performing measurement alter the internal energy of the observed system as a general rule?
It depends on what you count as total energy. Energy is conserved, it just changes phases. Subsystems give up energy or absorb the energy of the photon, as in the picture: the pair production took energy, that the photon gave up. The electron interacting with matter lost energy giving it to the photon.
And what about measurement in macroscopic scales; Can a measurement to a close system be without any consequences?
In a closed system whether classical or quantum mechanical, energy is conserved. Different equations for the conservation are necessary for the two regimes.