Brooklyn federal judge rejects state’s gas-drilling lawsuit