*: move get_sock_lsa and xwrite_str to libbb, use where appropriate