Fix the logic for branch detection for doc generation.
Fix the logic for branch detection for doc generation.

The old logic was incorrectly adding a ".x" for final releases. Now it
only does this if building docs for a non-release.

chipx86/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,chipx86/reviewboard