Setup code coverage

I think that it would be useful to set up test coverage with [coverage.py](https://pypi.python.org/pypi/coverage), or a similar tool. I can submit a PR if this sounds like a good idea.


Hi @Aaron1011! That's a perfectly good idea. However, 100% code coverage has never been an explicit goal of this project. In the absence of a particular code coverage target, I'm not convinced that adding coverage by default is a good plan. I'll defer to @kennethreitz's judgement in this case.

(Side note: You can do your own code coverage testing very easily by installing the [pytest-cov](https://pypi.python.org/pypi/pytest-cov) plugin for py.test. Then testing requests is done by the command `py.test --cov-report term --cov=requests test_requests.py`. This creates a fair amount of noise because it tests our coverage of our vendored libraries (charade and urllib3), which is irrelevant here. Excluding those we're at roughly 75% test coverage, which is pretty solid. Sample output from master:

```
============================= test session starts ==============================
platform darwin -- Python 2.7.5 -- pytest-2.3.4
plugins: cov
collected 73 items 

test_requests.py .........................................................................
--------------- coverage: platform darwin, python 2.7.5-final-0 ----------------
Name                                                             Stmts   Miss  Cover
------------------------------------------------------------------------------------
requests/__init__                                                   26      5    81%
requests/adapters                                                  143     41    71%
requests/api                                                        22      4    82%
requests/auth                                                      112     18    84%
requests/certs                                                       6      1    83%
requests/compat                                                     56     13    77%
requests/cookies                                                   198     82    59%
requests/exceptions                                                 15      0   100%
requests/hooks                                                      18      1    94%
requests/models                                                    359     63    82%
requests/packages/__init__                                           2      0   100%
requests/packages/charade/__init__                                  11      1    91%
requests/packages/charade/big5freq                                   3      0   100%
requests/packages/charade/big5prober                                12      5    58%
requests/packages/charade/chardistribution                         115     80    30%
requests/packages/charade/charsetgroupprober                        67     58    13%
requests/packages/charade/charsetprober                             23     11    52%
requests/packages/charade/codingstatemachine                        23     15    35%
requests/packages/charade/compat                                     8      4    50%
requests/packages/charade/constants                                  8      0   100%
requests/packages/charade/cp949prober                               12      5    58%
requests/packages/charade/escprober                                 44     33    25%
requests/packages/charade/escsm                                     17      0   100%
requests/packages/charade/eucjpprober                               48     35    27%
requests/packages/charade/euckrfreq                                  3      0   100%
requests/packages/charade/euckrprober                               12      5    58%
requests/packages/charade/euctwfreq                                  3      0   100%
requests/packages/charade/euctwprober                               12      5    58%
requests/packages/charade/gb2312freq                                 3      0   100%
requests/packages/charade/gb2312prober                              12      5    58%
requests/packages/charade/hebrewprober                              69     43    38%
requests/packages/charade/jisfreq                                    3      0   100%
requests/packages/charade/jpcntx                                    69     51    26%
requests/packages/charade/langbulgarianmodel                         5      0   100%
requests/packages/charade/langcyrillicmodel                         13      0   100%
requests/packages/charade/langgreekmodel                             5      0   100%
requests/packages/charade/langhebrewmodel                            3      0   100%
requests/packages/charade/langhungarianmodel                         5      0   100%
requests/packages/charade/langthaimodel                              3      0   100%
requests/packages/charade/latin1prober                              47     26    45%
requests/packages/charade/mbcharsetprober                           43     34    21%
requests/packages/charade/mbcsgroupprober                           14      3    79%
requests/packages/charade/mbcssm                                    41      0   100%
requests/packages/charade/sbcharsetprober                           70     53    24%
requests/packages/charade/sbcsgroupprober                           19      8    58%
requests/packages/charade/sjisprober                                48     35    27%
requests/packages/charade/universaldetector                        106     51    52%
requests/packages/charade/utf8prober                                39     28    28%
requests/packages/urllib3/__init__                                  27     11    59%
requests/packages/urllib3/_collections                              49     19    61%
requests/packages/urllib3/connectionpool                           208     66    68%
requests/packages/urllib3/contrib/__init__                           0      0   100%
requests/packages/urllib3/contrib/ntlmpool                          64     64     0%
requests/packages/urllib3/contrib/pyopenssl                         85     84     1%
requests/packages/urllib3/exceptions                                42     18    57%
requests/packages/urllib3/filepost                                  40      3    93%
requests/packages/urllib3/packages/__init__                          2      0   100%
requests/packages/urllib3/packages/ordered_dict                    155     78    50%
requests/packages/urllib3/packages/six                             217    113    48%
requests/packages/urllib3/packages/ssl_match_hostname/__init__      34     15    56%
requests/packages/urllib3/poolmanager                               79     31    61%
requests/packages/urllib3/request                                   31     16    48%
requests/packages/urllib3/response                                 136     46    66%
requests/packages/urllib3/util                                     170     73    57%
requests/sessions                                                  189     20    89%
requests/status_codes                                                8      0   100%
requests/structures                                                 55     14    75%
requests/utils                                                     244    109    55%
------------------------------------------------------------------------------------
TOTAL                                                             3830   1602    58%

========================== 73 passed in 23.84 seconds ==========================
```


In general I'm +1 on coverage reports for all projects. This is 
@kennethreitz's final call though.


Also for reference, we don't use real unit tests but rather tests that are closer to integration tests and those are never a good idea to use in conjunction with a coverage tool since the results can be wildly misleading. Just because you're executing a specific line during a test doesn't mean it's covered by tests and doesn't mean it does what you're expecting to every time. A better goal than adding coverage (in my opinion) is to add two types of tests: unit and integration and run both. The unit tests never have to hit the internet while the integration tests should hit something whether it be a local server or the actual internet. Check out sigmavirus24/betamax for how I'm doing that same thing there.


@kennethreitz any opinions on this?


Pinging @kennethreitz 


Let's make this `make coverage` so it's not part of the normal testing process.


:+1:


So using pytest's coverage plugin it's collected each time but not output each time ;). No need to worry about it putting out the coverage data each time.


My main worry is just computational intensity. Coverage is greedy :)


Roger. Shouldn't be too difficult. 


Fixed in 2.1.0.