Handle more legacy version numbers

We were not handling 1.2.1a1 or 2.1.0.rc1.

Change-Id: I087ff6f0449d528ee86b8e16721d12fd9b231846
Closes-Bug: #1361251