Proof Sketch: We show that each term in the sum can be bounded by the corresponding term in a geometric sequence - well, except maybe for a finite number of them.
Proof: Let $r_1,\ldots,r_n$ be random variables denoting the outputs of the rand function. Observe that $r_1,\ldots,r_n$ and for all $i$ we have $E[r_i]=\frac 1 2$. Also, we have $x_i = \prod_{1\le j\le i} r_j$ and since $r_i$'s are independent, we can write
$$E[x_i] = \prod_{1\le j \le i} E[r_j] = \frac 1 {2^i} $$
For each $i$, let $E_i$ denote the event $x_i\ge \left(\frac 3 4\right)^i$.
Then, by the Markov's inequality we have:
\begin{align}
\Pr[E_i] = \Pr\left[x_i\ge \left(\frac 3 4\right)^i\right] \le \left(\frac 4 3\right)^i \cdot \frac 1 {2^i} = \left(\frac 2 3\right)^i
\end{align}
Thus we have $\sum_{n=1}^\infty \Pr[E_n]$ is bounded by a geometric series with common ratio $2/3$, and therefore $\sum_{n=1}^\infty \Pr[E_n] <\infty$. Now, by the Borel-Cantelli lemma, only a finite number of $E_n$'s occur. Hence, we can break the sum as follows:
$$S_n = \sum_{i: E_i\mbox{ occurs}} x_i + \sum_{i: E_i\mbox{ does not occur}} x_i,$$
where the first sum is finite, and the second sum is upperbounded by a geometric series with common ratio $3/4$. This yields $\lim_{n\rightarrow \infty} S_n <\infty$.