split out and doc lib update warnings from test.c

Signed-off-by: Mattias Andrée <maandree@operamail.com>
add inclusion guard to update-warnings.h

Signed-off-by: Mattias Andrée <maandree@operamail.com>
split out and doc adjustment method functions from test.c

Signed-off-by: Mattias Andrée <maandree@operamail.com>