SMWSql3SmwIds::getDatabaseIdAndSort raise exception for when smw_object_...

...ids is inaccessible

For details, see #158.

- Use SMW\MediaWiki\Database instead of  wfGetDB