rutil: handle potential truncation in gethostname()

git-svn-id: https://svn.resiprocate.org/rep/resiprocate/main@10368 ddefafc4-47db-0310-ae44-fa13212b10f2
rutil: improve buffer size allocation in base64encode

git-svn-id: https://svn.resiprocate.org/rep/resiprocate/main@10369 ddefafc4-47db-0310-ae44-fa13212b10f2