userboot: support environment and symlinks in test application
Pass the environment on to the loader.
Also define USERBOOT=1 in the environment varables.
Add support for symlinks in the test application open callback.
stat the root directory when opening file
Without this, running "ls" command on the root directory encounters
issues getting the directory listing.
Reviewed by: jhb
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D44625