strip whitespace from the beginning and end of the display name

 strip whitespace from the beginning and end of the display name to avoid empty display names

If a display name stored in the database contains whitespaces only we return the uid. Before we set a new display name we check if it contains real characters, not only whitespaces.

cc @blizzz @PVince81 

fix #10817 
done :)