Add xdist detection in setup.py test command

Closes #298
> I read that good way to do that is using the imp module as you don't use xdist
> content. You just want to check if it exists or not.
Any ref? I noticed this in the code of setup.py but failed to understand
the motivation...