swift4: String fixes (#1024)

- Failable String initialiser has been obsoleted in swift4.

- Subscripts returning String were obsoleted in Swift 4,
  explicitly construct a String from subscripted result.
diff --git a/Foundation/NSURLSession/http/HTTPMessage.swift b/Foundation/NSURLSession/http/HTTPMessage.swift
index 91be843..8b82fb3 100644
--- a/Foundation/NSURLSession/http/HTTPMessage.swift
+++ b/Foundation/NSURLSession/http/HTTPMessage.swift
@@ -294,7 +294,7 @@
         if !line.isEmpty {
             if line.hasSPHTPrefix && line.count == 1 {
                 // to handle empty headers i.e header without value
-                value = String("")
+                value = ""
             } else {
                 guard let v = line.trimSPHTPrefix else { return nil }
                 value = String(v)
diff --git a/TestFoundation/HTTPServer.swift b/TestFoundation/HTTPServer.swift
index 4070399..1fb6199 100644
--- a/TestFoundation/HTTPServer.swift
+++ b/TestFoundation/HTTPServer.swift
@@ -98,7 +98,7 @@
         return stride(from: 0, to: str.characters.count, by: count).map { i -> String in
             let startIndex = str.index(str.startIndex, offsetBy: i)
             let endIndex   = str.index(startIndex, offsetBy: count, limitedBy: str.endIndex) ?? str.endIndex
-            return str[startIndex..<endIndex]
+            return String(str[startIndex..<endIndex])
         }
     }