Poland's former president Lech Walesa has warned that democratic advances made since communism ended will be destroyed if controversial reforms to the legal system go ahead.