[Driver] Fix Windows SDK Detection
[Driver] Fix Windows SDK Detection

This fixes a couple of bugs in Windows SDK Detection.

1. `readFullStringValue` returns a bool, but was being compared
   with ERROR_SUCCESS.
2. `RegQueryValueExW` might return the null terminator in the
   queried value which will result in incorrect values being
   returned from `getSystemRegistryString`.

Patch By: comicfans44@gmail.com
Reviewed By: zturner
Differential Revision: http://reviews.llvm.org/D21946

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@277005 91177308-0d34-0410-b5e6-96231b3b80d8

apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang