mediawiki.api: Do not cache errors in getToken()

Bug: 65268
Change-Id: I8d0e509b735dcf6a55ded29f0eb272bc1fdc2bc7
Merge "mediawiki.api: Do not cache errors in getToken()"