newlib: Allow SAFE_MACROS to be called from cleanup

Which is done by:

* Dropping attribute ((noreturn)) from all tst_brk_() definitions so
  that the function could actually return in case it's called from
  cleanup. This patch also fixes a few warnings caused by the change.

* Adding brk handler to tst_test.c so that we can temporarily replace
  the tst_brk_() function with function that maps TBROK to TWARN and
  calls tst_vres_().

+ updated test-writing-guidelines

+ testcase

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Jan Stancek <jstancek@redhat.com>
8 files changed