Poland's ruling party lawmakers has given preliminary approval to two bills allowing parliament and the president to replace top judges, plans the opposition and the European Commission are denouncing as a threat to the rule of law.