Add gnu_dev_* symbols

There are three Linux specific symbols gnu_dev_major(), gnu_dev_minor()
 and gnu_dev_makedev() that were not implemented in musl libc.
This patch adds these by reusing major(), minor() and makedev() code
from musl macros.
It also uses the macros from newer version of musl, that work around
some bugs, see musl changelog
https://github.com/rofl0r/musl/commit/9b732fe51b814468a08c84d13238b4c83a42451a

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Constantine Peresypkin <constantine.peresypk@rackspace.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tests: fix quitting qemu

Apparently, recent versions of qemu got more unfriendly toward automated
scripts. When a client conntects to an unix socket on which the monitor
is available qemu first sends a welcome message (any error causes qemu
to immediately close connection). Then the socket is added to poll().
If POLLHUP or POLLERR is reported then qemu also closes the connection
discarding any unread data (so sending command to qemu and immediately
closing connection won't work).

This patch deals with this qemu shyness by taking advantage of the fact
that send_command('quit') was the only use of that method and in this
particular case self.join() can be used so that connection isn't closed
too soon and qemu actually executes the command.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>