Improve encapsulation of modules

The problem: I want to write a unit test for the functions in
portsrange.c. If the project is configured with --enable-debug, then the
code in portsrange.c depends on the ncprint and debug_fmt functions
which are defined in misc.c. However, misc.c depends on stuff in
netcat.c. On the other hand, netcat.o can't be linked into the unit test
executable because it contains the main function.

The solution: Move the ncprint and debug_fmt functions to a separate
file (ncprint.c) and ensure that it is completely self-contained. In
that case, it is enough to link ncprint.o together with portsrange.o
into the test executable.

Required changes:
* Rename misc.h to ncprint.h (mish.h only contained stuff relevant for
the two functions moved to ncprint.c).
* Make opt_debug and opt_verbose static variables in ncprint.c and
define new functions to set them.
Fix an incorrect portsrange test case