This patch is brought to you by the Department That Hates Users.
The latest debian unstable release is now causing a bunch of new
test failures because they have deprecated the which command.
Rather than make everyone jump through hoops chasing problems with
'which' while debian decides to how to package at least three
variants of 'which' - each which will different semantics, behaviour
and support - as alternatives users then have to opt into, let's
just remove the remaining uses of the shell independent 'which'
command and replace them with bash builtin 'type -P' operations.