Fix generating the path to the manual URL for dev builds.

The old manual URL generation function was assuming that any
non-released builds should us the 'dev' docs, but this is often wrong.
What we actually want is to use the 'dev' docs for any X.Y.0 releases
that aren't marked as "final". This changes the logic accordingly.

Reviewed at https://reviews.reviewboard.org/r/6579/