dsm.c: remove vestigial openssl includes
dsm.c: add -h and -v getopt style option parsing
dsm.c: clear up what av[1] is
dsm.c: parse getopt options
allow netbios_ns_resolve to return an error code

This change also changes netbios_ns_resolve to distinguish between
an error and a non-reply from a host.
Replaces the too complex iterator API by _count() and _at() functions
Tweak and merge pull request #1 on lu-zero/libdsm from reubenhwk/cleanups.