misc/team: Fix compiler complaints
The code used a very old "all arguments are compatible with int"
method for a varargs message function. Convert it to <stdarg.h>.
While at it, replace a few private library function declarations by
their appropriate header file includes.