Added conversion from friend_id to client_id

It's a very handy function to have, especially when trying to figure out whose message is that in the message callback, if one doesn't store client_id <-> friend_id association, which is already stored in the core.

Does reverse of what `getfriend_id()` does.