[SILGen] Create thunks for non-throwing -> indirect error result conversions
When a non-throwing function is passed to a function that expects a
throwing function with an indirect error result, we need to create a
thunk because the indirect error result pointer is passed as an extra
trailing parameter. Extra trailing parameters except for `swifterror`
and `swiftself` are not allowed on some platforms like WebAssembly, so
they need to be called as exactly the same function signature.
```swift
func passThrough<X>(_ c: () throws(X) -> Void) throws(X) {
try c()
}
func neverThrow() {}
passThrough(neverThrow)
```