Proposed fix to #1180 (and maybe #932 & #1104)

This is a rebased final version of a proposed solution to fix
issues #932, #1104 & #1180. Following changes have been done:

* Implemented a new class `PipXmlrpcTransport` using a
  contained `PipSession` object.

* Modified the `pip/commands/search.py` to make use of the
  `PipXmlrpcTransport` class.

* Properly initialized options for testing `SearchCommand`:
  - Changed `options_mock` to an `options` object built from
    `parse_args`, to properly initialize default options.
Hmm, I just noticed this. I'd rather not modify the session in this. Can we just pass this header on each ``self._session.post`` call? That way sessions don't start acting differently just because you used them in PipXmlrpcTransport``.