Header normalization and merging utilities.
@spec build(map(), map(), list(), map(), binary() | nil) :: {:ok, map()} | {:error, term()}