MDL-40612 libraries: Unit test expansion for get_all_user_name_fields()

and the inclusion of tests for set_user_name_object()
MDL-40612 libraries: Tidy up and improvement of the code for additional name fields.

Includes an update to get_all_user_name_fields() and the inclusion of set_user_name_object()