A native Swift port of BFTask from https://github.com/BoltsFramework/Bolts-iOS