'Searches for users in directory
Returns:
dict of the form::
"limited": <bool>,  # whether there were more results or not
"results": [  # Ordered by best match first
"user_id": <user_id>,
"display_name": <display_name>,
"avatar_url": <avatar_url>'

@defer.inlineCallbacks
def on_POST(self, request):

    requester = (yield self.auth.get_user_by_req(request, allow_guest=False))
    user_id = requester.user.to_string()
    body = parse_json_object_from_request(request)
    limit = body.get('limit', 10)
    limit = min(limit, 50)
    try:
        search_term = body['search_term']
    except:
        raise SynapseError(400, '`search_term`    is    required    field')
    results = (yield self.user_directory_handler.search_users(user_id, search_term, limit))
    defer.returnValue((200, results))
