madvise/madvise02.c: cleanup

Move the test body from main() to (*testfunc[])().
Use some SAFE_* macros.
Some cleanup.

Signed-off-by: Xing Gu <gux.fnst@cn.fujitsu.com>
madvise/madvise02.c: extend EINVAL test for MADV_MERGEABLE and MADV_UNMERGEABLE advice

extend EINVAL test for MADV_MERGEABLE and MADV_UNMERGEABLE advice

Signed-off-by: Xing Gu <gux.fnst@cn.fujitsu.com>