Modifications:
- Replace `HTTPHandler` with `NIOHTTPClientResponseAggregator`, to fix a CoW issue. This increases performance.
- Ensure that we only use one `EventLoop` in tests.
- Use `syncOperations` to setup the `HTTPClient`.
* allow the users of client to provide headers
* add initialization error header
* add error header to failed invocations
* fix external setting of ip and port via config
* add tests
motivation: allow end to end testing locally
changes:
* add a Lambda+LocalServer which exposes Lambda.withLocalServer available only in DEBUG mode
* local server can receive POST requests with payloads on a configurable endpoint and and send them to the Lambda
* move Lifecycle completely into EventLoop
* remove all locks since running in one EventLoop
* Use UUID for requestId
Co-authored-by: tom doron <tomer@apple.com>