Remove dead assignments and now unused variables.

Found by LLVM/Clang Static Analyzer.

ok henning@ mikeb@ bluhm@
Prep for hidden visibility: move the vnode/file related function
declarations, including _kvm_getftype(), into a new header, kvm_file.h,
so that we don't have to pull <sys/vnode.h> into all the .c files.  No
more extern function declaration in .c files.

ok millert@
ANSIfy a declaration
_kvm_syserr() is printf-like too