docs: Fix ReadTheDocs branch to version conversion
rtdbuild.py needs to convert a git branch to an rtd version. It's previous method was very simple and broke when branch names contained capital letters (among other things). So let's replace with a better version which is based on RTD's own implementation.
Fixes: b22d082f ("ci: Automatically build and publish readthedocs documentation") Signed-off-by: Ryan Roberts ryan.roberts@arm.com