multipath: fix shutdown crashes
A number of processes don't reach a pthread cancellation point
before they use the pathvec or mpvec vectors, after they've
locked the vecs lock. This can cause crashes on shutdown, since
these vectors are deallocated. Also, the log thread accesses a
number of resources which may have been deallocated during shutdown
without holding any locks. This patch avoids these issues by
adding pthread_testcancel() checks after acquiring the vecs lock,
and having the child process make sure the log thread has exitted
before deallocating the resources.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>