Gibraltar scored their first ever competitive goal, but Steven Fletcher's hat-trick helped Scotland recover to win Sunday's European Qualifier 6-1 at Hampden Park.