Writing $\dot\theta=\omega$ is slightly dangerous because it will give you the impression that $\dot\theta$ is constant, but it definitely isn't constant when $e>0$: Kepler's second law demands the planet move faster when it is closer to the focus than when it's far away. The factor $(1+e\cos\theta)^2$ is there to ensure this.
The equation you found does indeed reduce to Kepler's third law for a circular orbit, but in general it is simply the (reduced) equation of motion of the planet. This is a differential equation for $\theta(t)$ and it is solvable by quadratures: you can reduce it to $t=\text{SomeIntegral}(\theta)$, which "solves" the problem. Unfortunately, the integral is an elliptic integral, which does not reduce to elementary functions. You need to use the Jacobi elliptic functions to invert that relation and get $\theta=\theta(t)$. (This isn't as bad as it sounds: the Jacobi functions are, in practice, not (much) harder to calculate than a sine or a cosine.)
Note also that Kepler's third law, $a^3/T^2=GM/4\pi^2$, holds regardless of the ellipticity. Here $T$ is the time taken to complete one orbit, and only equals $2\pi/\dot\theta$ when the latter is constant. (This is the kind of mistakes that writing $\dot\theta=\omega$ will get you into: it makes you think that the other relations $\omega$ is often in, like $\omega=2\pi/T$, still hold, though they usually don't.)
Your intuition of "an average over one period" does hold some water, but you need to be very careful when doing it. $T$ is the time taken to complete one orbit, so $\theta$ goes from $0$ to $2\pi$. This means that
$$T=\int_0^Tdt=\int_0^{2\pi}\frac{d\theta}{d\theta/dt}=\sqrt{\frac{a^3}{GM}}\int_0^{2\pi}\frac{(1-e^2)^{3/2}}{(1+e\cos(\theta))^2}d\theta,$$
and the last integral should come out to $2\pi$ if you do everything right. Thus you could say that $T$ is the average of $2\pi/\omega$ over one loop, taking care to do the average so all angles count equally (instead of all times!). But I would call that over-reading into the calculation, which is important in its own right.
The bottom line, then, is that you don't need averages to make sense of Kepler's third law in the elliptical case. This shouldn't surprise you! Kepler knew the orbits he studied were not circular and that $\dot\theta$ was not constant (so well that those facts also carry his name), and still managed to formulate the third law.