THRIFT-5635 Update erlang client for Erlang 23-25
Client: erl
Patch: Sergey Yelin

This closes #2677

Summary of changes:
 - Add useful compiler options
 - Format sources using erlfmt
 - Switch to modern callbacks in thrift_* modules
 - Add static analysis (dialyzer), disabled by default
 - Add/fix types for API calls

NOTE: Enabling static analysis requires additional tweaks in multiplexer module.
diff --git a/build/docker/README.md b/build/docker/README.md
index 9635e6f..abf0823 100644
--- a/build/docker/README.md
+++ b/build/docker/README.md
@@ -177,7 +177,7 @@
 | d         | 2.087.0       | 2.087.0       |       |
 | dart      | 2.0.0         | 2.4.0         |       |
 | delphi    |               |               | Not in CI |
-| erlang    | OTP-18        | OTP-23        |       |
+| erlang    | OTP-20        | OTP-25        |       |
 | go        | 1.15.10       | 1.16.2        |       |
 | haxe      | 3.2.1         | 3.4.4         | THRIFT-4352: avoid 3.4.2 |
 | java      | 1.8.0\_191     | 17           |       |
diff --git a/build/docker/old/ubuntu-xenial/Dockerfile b/build/docker/old/ubuntu-xenial/Dockerfile
index 64d4804..d954e7f 100644
--- a/build/docker/old/ubuntu-xenial/Dockerfile
+++ b/build/docker/old/ubuntu-xenial/Dockerfile
@@ -121,7 +121,7 @@
       dotnet-apphost-pack-7.0
 
 # Erlang dependencies
-ARG ERLANG_OTP_VERSION=18.3.4.11
+ARG ERLANG_OTP_VERSION=20.3.8.9
 ARG ERLANG_REBAR_VERSION=3.13.2
 RUN apt-get update && apt-get install -y --no-install-recommends automake libncurses5-dev && \
       curl https://raw.githubusercontent.com/kerl/kerl/master/kerl -o /usr/local/bin/kerl && chmod +x /usr/local/bin/kerl && \