remove hack in syslog.h that resulted in aliasing violations

this issue affected the prioritynames and facilitynames arrays which
are only provided when requested (usually by syslogd implementations)
and which are presently defined as compound literals. the aliasing
violation seems to have been introduced as a workaround for bad
behavior by gcc's -Wwrite-strings option, but it caused compilers to
completely optimize out the contents of prioritynames and
facilitynames since, under many usage cases, the aliasing rules prove
that the contents are never accessed.
implement result address sorting in the resolver (getaddrinfo, etc.)
implement fmtmsg function

contributed by Isaac Dunham. this seems to be the last interface that
was missing for complete POSIX 2008 base + XSI coverage.