Judge halts unauthorized demo of Troy building, orders owner