Fix EZP-21853: Custom HTTP headers create duplicate values

Link: https://jira.ez.no/browse/EZP-21853

## Description
The legacy kernel controller adds to the request legacy's headers. The problem is that it did not remove the existing value. That could lead to headers with duplicate values making them incoherent.

Legacy headers must have priority, so this patch clears existing headers before we set legacy ones.

## Test
Manual tests