Add searching support for user

Also correspondingly update tests, fix enum values for sex ('M', 'F'
instead of 'M', 'T'), add support for argument to specify the fields to
select.