1951: feat: Add an error code on the metering middleware r=MarkMcCaskey a=jubianchi
_This is a proposition for #1931._
~~**⚠️ Do not merge as-is. Wait for #1941 to get merged or to provide an alternative**~~
Basically, the metering middleware now injects a new global, `error_code` with its own helper `get_error_code` which will allow the host to correctly handle metering errors. Now, a `remaining_points == 0` and `error_code != NoError` means the execution of the guest module consumed all the gas points.
# Review
- [ ] Add a short description of the the change to the CHANGELOG.md file
Co-authored-by: jubianchi <[email protected]>