Huawei Technologies filed a lawsuit challenging a law that restricts federal agencies from doing business with the Chinese company, the latest in a series of countermoves by the telecommunications giant.