Use uint16 for port numbers more pervasively.

We currently use a mixture of ints and uint16s for port numbers.  This triggers a variety of "value possibly truncated" warnings on MSVC (currently disabled) wherever we implicitly truncate.  Fix this by using uint16 consistently through more functions.  (Using int consistently would be more problematic as the majority of third-party/system APIs that use port numbers use 16-bit types for them.)

By far the majority of these changes are fallout from changing IPEndPoint, which is widely used; it'd be difficult to split this CL up into smaller pieces :(

Note that I didn't use uint16_t to avoid introducing inconsistencies between existing uint16 usage and new uint16_t usage.  Conversion of everything to uint16_t can happen later.

This CL was reviewed and approved in pieces in the following CLs:
https://codereview.chromium.org/716223002/
https://codereview.chromium.org/717263003/
https://codereview.chromium.org/717373002/
https://codereview.chromium.org/718273002/
https://codereview.chromium.org/722503002/
Committing as TBR to the original reviewers.

BUG=81439
TEST=none
TBR=gunsch,cpu,jhawkins,davidben,jyasskin,mmenke

Review URL: https://codereview.chromium.org/655063002

Cr-Commit-Position: refs/heads/master@{#304961}
diff --git a/chrome/browser/net/sdch_browsertest.cc b/chrome/browser/net/sdch_browsertest.cc
index e929ac2..32ca64a 100644
--- a/chrome/browser/net/sdch_browsertest.cc
+++ b/chrome/browser/net/sdch_browsertest.cc
@@ -321,7 +321,7 @@
                        bool* sdch_encoding_used) {
     FetchUrlDetailed(
         GURL(base::StringPrintf(
-            "http://%s:%d%s", kTestHost, test_server_port(), kDataURLPath)),
+            "http://%s:%u%s", kTestHost, test_server_port(), kDataURLPath)),
         getter);
     EXPECT_EQ(net::URLRequestStatus::SUCCESS, FetcherStatus().status())
         << "Error code is " << FetcherStatus().error();
@@ -455,7 +455,7 @@
     run_loop.Run();
   }
 
-  int test_server_port() { return test_server_.port(); }
+  uint16 test_server_port() { return test_server_.port(); }
 
   void SetSdchCacheability(bool cache_sdch_response) {
     base::RunLoop run_loop;