Fix two crashing bugs related to checked downcasts - rdar://problem/16093456 and rdar://problem/16892211.
Fix two crashing bugs related to checked downcasts - rdar://problem/16093456 and rdar://problem/16892211.

Swift SVN r18118

apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation