MessageCache: Fix isMainCacheable() logic for non-content languages
The way isMainCacheable() was used, it always returned false in
non-content languages, because it would try to find strings like
'hidetoc/fr' in the array of message keys (which contains strings like
'hidetoc').
The consequence of this was that MessageCache would check the database
for a MediaWiki:hidetoc/fr page even if it already knew that that page
didn't exist. This is a substantial performance hit when requesting lots
of messages, like when building version hashes for ResourceLoader's
startup module.
Follows-up
4fc5ba8bf83102b02.
Bug: T228555
Change-Id: I20433175ca919acc1c995f4a9cd50ca53afcdd02