Support Swift 3 and 4
Enable Dual Compilation for Swift 3.1.1 and 4.1.2 (#5)
This change enables it to build/test for both Swift 3 and 4 at the same time. The code remains mostly Swift 4, but uses wrappers around the Swift 3 versions of functions to allow most of the Swift 4 code to continue to operate.