Japan court clears way for nuclear reactor restarts