Moved Ruby code that multiple repositories use to mediawiki_selenium Ruby gem

Bug: 56088
Change-Id: Ibb279467bd9509bee3bc07f2f58263f87dab3327