[fix bug 911980][fix bug 848256][fix bug 848257] API refactoring, tests and bug fixing.

* Refactor API to not use the ElasticSearch backend (bug 911980)
* Explicitly set the fields returned by UserResource
* Fix filters containing spaces (bug 848257)
* Fix filters with commas (bug 848256)
[fix bug 862058] Export username in UserResource.