A federal judge on Monday blocked California’s ban on gun shows at county fairs, ruling that the state is violating the rights of sellers and would-be buyers by prohibiting transactions for firearms that can be bought bought at any gun shop.