Sine-Gordon model at finite temperature: the method of random surfaces