Add few common functions

The dnscache's logger, log.c, defined few functions which are useful
for the tinydns' & its cousin's logger too. These functions are used
to log values in human readable form, rather than cryptic hexadecimal
notation.

These functions: 'number', 'string', 'logtype', etc. are moved from
log.c to common.c so that they could be reused & share by all DNS
servers.
Move reusable routines to common.c

The dnscache's logger, log.c, defined few functions which are useful
for other DNS servers too. So moved those functions: 'number',
'string', 'logtype', etc. to common.c.

Also did little source formatting to make it more readable.
Improve root server's log structure

Changed 'qlog.c' routines to improve tinydns' and its cousin
server's log structure for better comprehension. Added timestamps,
query number; And replaced hexadecimal values with human readable
decimals.

Also did little source formatting to make it more readable.
Pass query number parameter

'qlog' routine was improved to accept query number parameter
for logging purposes. Changed the 'axfrdns' & 'tinydns' server
routines to define & update query number and pass the same to the
'qlog' routine, so that logs are numbered by incoming queries.