Your bullet points amount to saying that you're going to flip the coin until the number of heads exceeds the number of tails. Suppose that this happens on the $n$-th flip; then after $n-1$ flips you must have had equal numbers of heads and tails, so $n=2m+1$ for some $m$, you now have $m+1$ heads, and the ratio of heads to flips is $\frac{m+1}{2m+1}$. If $p_n$ is the probability of stopping after the $(2n+1)$-st flip, the expected ratio of heads to flips is $$\sum_{n\ge 0}\frac{p_n(n+1)}{2n+1}\;.$$ Thus, the first step is to determine the $p_n$.
Clearly $p_0=\frac12$: we stop after $1$ toss if and only if we get a head. If we stop after $2n+1$ tosses, where $n>0$, the last toss must be a head, half of the first $2n$ tosses must be heads, and for $k=1,2,\dots,2n$ the first $k$ tosses must not include more heads than tails. The problem of counting such sequences is well-known: these are Dyck words of length $2n$, and there are $C_n$ of them, where $$C_n=\frac1{n+1}\binom{2n}n$$ is the $n$-th Catalan number. Each of those $C_n$ sequences occurs with probability $\left(\frac12\right)^{2n}$, and each is followed by a head with probability $\frac12$, so $$p_n=C_n\left(\frac12\right)^{2n}\cdot\frac12\;,$$ and the expected ratio is $$\frac12\sum_{n\ge 0}C_n\left(\frac12\right)^{2n}\frac{n+1}{2n+1}=\frac12\sum_{n\ge 0}\frac1{4^n(2n+1)}\binom{2n}n\;.$$
Very conveniently, the Taylor series for $\arcsin x$ is $$\arcsin x=\sum_{n\ge 0}\frac1{4^n(2n+1)}\binom{2n}nx^{n+1}\;,$$ valid for $|x|\le 1$, so the expected ratio is $$\frac12\sum_{n\ge 0}\frac1{4^n(2n+1)}\binom{2n}n=\frac12\arcsin 1\approx 0.7854\;.$$
Added: I should emphasize that this calculation applies only to the stated strategy. As others have noted, that strategy is known not to be optimal, though it's quite a good one, especially for being so simple.
I ask you for additional explanation. Meanwhile I'll post here another approach.
Denote by $\tau_i^5$ the random variable that counts the time required to get five heads starting from $i$ heads, ok?
What we want is exactly $E[\tau_0^5]$, right?
Now, you can evaluate $E[\tau_0^5]$ conditioning at the first step.
$$
E[\tau_0^5] = \frac{E[\tau_0^5]}{2} + \frac{E[\tau_1^5]}{2} +1
$$
Explaining the equation above. With probability $1/2$ you have a tail, so the time you will take to get five heads is the same, because you have any heads. On the other hand, with the same probability you get a head, and now, the number of flips needed to get 5 heads is $E[\tau_1^5]$, because now you that you have one head. The +1 it is because you have to count the first step.
Repeating the argument above you get
$$
E[\tau_1^5] = \frac{E[\tau_0^5]}{2} + \frac{E[\tau_2^5]}{2} +1
$$
Proceeding this way, and remembering $E[\tau_5^5]=0$, you get
$$
E[\tau_0^5] = 62
$$
This may seems more complicated at the first sight, but the idea of "to conditionate at what happens at the first time (or movement)" solve a big variety of problems.
Best Answer
Let $H_t$ and $T_t$ be the number of heads and tails, respectively, after $t$ flips; let $D_t := H_t - T_t$ be their difference. You now want to look at the first time $T$ that $D_t$ reaches either $+10$ or $-7$:
$$ T = \inf\bigl\{ t \ge 0 \mid D_t \in \{+10, -7\} \bigr\}. $$
Observe that $D$ steps up by $+1$ with probability $\tfrac12$ and down by $-1$ with probability $\tfrac12$; that is, $D$ is just a simple random walk!
So, we have reduced the question to one of hitting time for SRW. This is a very well-known problem, called Gambler's ruin. You can find the expected value $\mathbb E(T)$ of $T$ by searching for this online.
You can calculate it directly using standard hitting-time techniques. Let $X$ be simple random walk on $[0,n] \cap \mathbb Z$; we will be interested in $n = a+b$ and starting from $a$. Let $T$ be the first hitting time of either $0$ or $n$ and $t_i := \mathbb E_i(T)$, ie the expected hitting time started from $i$. Then,
$$ t_i = 1 + \tfrac12 t_{i-1} + \tfrac12 t_{i+1}, \quad t_0 = 0 \quad\text{and}\quad t_n = 0. $$
Solving this relation gives $t_i = i(n-i)$. You should verify this yourself, too! Now, we care about an interval of length $a+b = n$ and starting $a$ from one side, so the time we're interested in is
$$ \mathbb E_a(T) = a \bigl( (a+b) - a \bigr) = ab. $$
You can also prove this using martingales. An introduction to these is given in Section 4.1 of Norris's book. In particular, your exact question is answered on Page 117, at the very end of Section 4.1. You can also find many more expositions online. In particular, if $+10$ is replaced by $+b$ and $-7$ by $-a$, then, indeed, $\mathbb E_0(T) = ab$, the product, as you noticed.