loader.cc: Fix if_name() related use after free

With "conf-debug_memory=1", I am seeing the following splash when
building a new image:

  /home/penberg/osv/scripts/mkzfs.py -o bare.img -d bare.img.d -m bootfs.manifest
  OSv v0.15
  eth0: 192.168.122.15
  page fault outside application, addr: 0xffffb0000519a000
  [registers]
  RIP: 0x000000000043ba75 <strlen+37>
  RFL: 0x0000000000010246  CS:  0x0000000000000008  SS:  0x0000000000000010
  RAX: 0xffffb0000519a018  RBX: 0x0000000000618846  RCX: 0x9b97bcffafb6a0a9  RDX: 0x030700ff0f000001
  RSI: 0x8080808080808080  RDI: 0xffffb0000519a018  RBP: 0x00002000001ffc10  R8:  0xfefefefefefefeff
  R9:  0x8080808080808080  R10: 0x0007fffffffff000  R11: 0xffff800000000000  R12: 0x0000000000000001
  R13: 0x8080808080808080  R14: 0x0007fffffffff000  R15: 0xffff800000000000  RSP: 0x00002000001ffc10
  Aborted

  [backtrace]
  0x000000000032c42f <???+3327023>
  0x000000000032d563 <mmu::vm_fault(unsigned long, exception_frame*)+147>
  0x0000000000390f39 <page_fault+105>
  0x000000000038fe26 <???+3735078>
  0x000000000044d1aa <setenv+122>
  0x0000000000212d2b <do_main_thread(void*)+2987>
  0x000000000043f5a5 <???+4453797>
  0x00000000003ec7b7 <thread_main_c+39>
  0x0000000000390da5 <???+3739045>
  0x2221201f1e1d1bff <???+505224191>
  0x00000000003ecd8f <???+4115855>
  0x48ec834853fc8948 <???+1409059144>

Looking at the code, we take a pointer to a string that's returned from
osv::if_ip(). However, as soon as we exit the scope, the string is
destroyed and memory is recycled.

The bug was introduced in commit a296f8b ("loader: Adding OSV_IP
environment variable").

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>