Changes wb.RepoApi.getEntities to promise a collection of wb.Entity

Would promise a collection of raw data before.

* changed jQuery.wikibase.snakview to make use of the change (rather than break).
* simple refactoring and adjustment of some API test

Change-Id: If80ca6c9048cd9d6880a9c790240fdb4e81cbcc0
Merge "Changes wb.RepoApi.getEntities to promise a collection of wb.Entity"