Robert Lewandowski scored twice for Poland as they earned a late draw with Scotland in Euro qualifying competition.