Moving shared code to mediawiki-selenium Ruby gem

Bug: 53579
Change-Id: I0dcc7d7c91ceabb30e9161238592ddacd666deaa