Polish opposition looks set to oust ruling nationalists in major political shift