Fix checks for wheel existance.

A package should only be considered to already exist in devpi if
there is a wheel of the package, and if that wheel is in the index
the user specified (not an inherited index).

The first of these requirements is because otherwise we consider a
non-wheeled item to be cached already if it exists at all in the
index. We really want to build wheels.

The second exists to work around a bug in devpi where it seems to
be unhappy with inheriting wheels from parent indexes.