Troubles with Gibbs free energy
Your error occurs when you write that

$$dS_{tot}=\frac{\delta Q}{T_{r}}-\frac{\delta Q}{T}$$

since this assumes that 

$$\delta Q=-TdS$$

which implies reversibility and therefore that $dG=0$ at constant T and p.

The more general statement is that 

$$dS_{tot}=\frac{\delta Q}{T_{r}}+dS$$ 

which means that 

$$dS_{tot}=-\frac{dH}{T_{r}}+dS$$ 

(since positive heat here means exothermic)

Then 

$$T_{r}dS_{tot}=-dG+(T_{r}-T)dS$$ 

or

$$dG=-T_{r}dS_{tot}+(T_{r}-T)dS$$ 

Now if you let $T=T_{r}$ (thermal equilibrium with surroundings) then

$$dG=-TdS_{tot}$$