Refactored fn w/ user/lang globals to owDBAPI

Patch 2: return use of "" instead of null

Patch 3: avoided using the user global. I created a fresh database to work
with and found out that when the preference has not been set, the user
global will produce errors. And the new Mediawiki uses nan instead of
the old wikimedia code zh-min-nan, so the user language global will not
find the proper code.  Hopefully the new one will.

Patch 4: added identical meaning option to getSpelling* functions.

Patch 5: selectSQLText error. Sorry.

Patch 6: found the problem for non displayed expression. forgot to use ==
instead of = in conditionals.

This at least works well for my nan language. Test for other language is
needed.

Change-Id: Ib6d66a29c405bf4656cc3f94a54a2c37ef551114
Merge "Refactored fn w/ user/lang globals to owDBAPI"