e2e/swift: generalize callHeadObject to callSwiftMethod
e2e/swift: generalize callHeadObject to callSwiftMethod

This will help us simplifying the other tests.

zerovm/swift-browser,mgeisler/swift-browser,mindware/swift-browser,mgeisler/swift-browser,zerovm/swift-browser,mindware/swift-browser