build: Support pthread builds without 'pthread_cancel' support (Android).
Reported by Sylvain Beucler <beuc@beuc.net>.
* configure.ac: Check for 'pthread_cancel'.
* libguile/threads.c (scm_cancel_thread): Conditionalize on
!SCM_USE_PTHREAD_THREADS || defined HAVE_PTHREAD_CANCEL.
* test-suite/tests/threads.test (require-cancel-thread): New procedure.
("timed joining fails if timeout exceeded", "join-thread returns
timeoutval on timeout", "cancel succeeds", "handler result passed to
join", "can cancel self"): Use it.