Get mw branch from target URL and check it out

I added a MediaWiki API entry point to retrieve the git_branch being
used. The slave script mw-api-siteinfo.py can then be used to easily
fetch the target URL git branch.

The script then simply checkout the branch and clean the workspace. That
should hopefully be good enough.

Note: there is NO error checking.

Bug: 62509
Change-Id: I321aa54ea3c3204abe860a4f064a217ee0b90d8a