A sensational stoppage-time header by Andy Robertson earned Scotland a victory against Poland and kept alive their chances of staying in the top tier of the Nations League.