Wikia code/api.php

One of the changes (which showed up in two spots because it was some moved code) is already in core.

Another change involved removing 'wgHideAPI' variable from Wikia's codebase (it wasn't used for anything).