[lib] remove duplicated code in rsa.c

remove duplicated code in rsa.c
    - duplicated code in public_key_to_gstring and public_key_append_to_gstring is not necessary
    - better code style
我们的编程风格是这里不加空格的。