Make sure that backend testing in multiprocessing is done with a timeout

I hope this will solve #3738 and #3444 which looks like duplicates. Rebased onto 1.4.x