made setfriendname() part of public api

This is needed to allow the client to easily enforce its own length limits and deal with duplicate names.