libc: implement secure_getenv()

It's needed by openssl. It supposed to return NULL if the environemnt is not
trusted. Our implementation just delegates to getenv().

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
devfs: implement devfs_getattr()

This fixes openssl issue manifesting itself with inability to
establish an SSL connection. Openssl refused to create new connection
due to insufficient entropy to generate session id. There was no
entropy because RAND_poll() didn't manage to read anything from any of
the randomness sourcess, which by default are:

 /dev/urandom
 /dev/random
 /dev/srandom

We do, however, have /dev/random on OSv. The problem was that when
openssl tries different sources it skips the ones which it already
tried by comparing stat.st_ino and stat.st_dev as returned by
fstat(). Because devfs didn't implement getattr operation both these
fields were always 0 so even though /dev/random was present it was not
considered.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>