In its battle with the EU over judicial reforms, Poland is having its Brexit moment, writes academic Anna Gromada