Use canUseWikiPage before getWikiPage

getWikiPage() creates an Exception if there is no WikiPage, so first check,
if the Page can be used as a WikiPage with canUseWikiPage().

Implemented a redirect to Main page in redirectmobileeditor if no targeturl
is in page.

Follows up: I509f7dac52b7837bf8b07a790c87f83208568e70

Bug: 68249
Change-Id: I3278b323b953bdd60f455be576adfe6fbc39d823
(cherry picked from commit 755f0a41ff2887b6e8fde87e0fea63e269b171c9)