Moving shared code to mediawiki-selenium Ruby gem

Bug: 53579
Change-Id: I9ee6ccd4c3e898a83c51eceeb8f2e6e9fefe6415