[browser test] Moved Ruby code that multiple repositories use to mediawiki_selenium Ruby gem

Bug: 56088
Change-Id: I9fdfcf0f9df8f1bd9df3c358d2e1a7925fa5928d