Roger Federer marked his return to the court for the first time in over a year with a three-set win over Dan Evans at the Qatar Open.