Refactor mediawiki::singlenode and wikidata::singlenode into modules.

Change-Id: I7514bc9de98507c001dd4fc2e090d38b13cc0829