I think you were on the right path in your original post. For one, let's at least talk about the boundary conditions. I'll rewrite your equations with a more useful construct for the "constant".
$$\rho v = \rho_{in} v_{in}$$
$$p + \rho v^2 = p_{in} + \rho_{in} v_{in}^2$$
And state of course
$$p=\rho r T$$
The $v$ will only have one direction and will never change sign, so no need to be dealing with vector math. The unknowns are fully stated as $v$, $T$, and $\rho$, which can be a function of the position down the pipe, $x$, but I suggest that the easy way is to find an answer in terms of temperature instead.
Solving the equations you can arrive at the following in order to define $\rho$.
$$0=\rho^2 r T - (p_{in} +\rho_{in} v_{in}^2) \rho + (\rho_{in} v_{in})^2$$
Now stop and think about this equation for a little bit, and consider the part of $-b \pm \sqrt{b^2-4ac}$, and that the term $ac$ is positive, and $-b$ is positive. That means that the only way for this to be positive is for the sign to be positive, or for us to take the largest root. Forget entropy arguments, in the world I live in, density is clearly positive. We have now defined $\rho(T)$ as the positive root for the preceding equation. The rest follows easily.
$$v=\frac{\rho_{in} v_{in}}{\rho(T)}$$
$$p = \rho(T) r T$$
Take the above, and plug in $T_{out}$ and you're finished. For those of you who will yell at me for not being 100% explicit, here you go:
$$\rho(T) = \frac{p_{in} +\rho_{in} v_{in}^2 + \sqrt{(p_{in}+\rho_{in}v_{in}^2)^2-4 r T (\rho_{in} v_{in})^2}}{2 r T}$$
Just to recap, you should have known quantities for $p_{in}$, $T_{in}$, and $v_{in}$. If you don't, then you need to figure out what the question is. It follows that $\rho_{in} = p_{in}/(r T_{in})$, and these all go into the above equations. Then if you know how much it was cooled by the time it reaches the end of the pipe, plug in that for $T$ and the above equations are the answer to your problem. You may have the information in some different form, like knowing the length of $x$ and having basically $dT/dx$, although that quantity might have to come after applying different physical laws. Whatever, you have what I think is an agreeable solution giving a $T$, the rest is up to whatever it is you need.