Fix EZP-21853: Custom HTTP headers create duplicate values

Link: https://jira.ez.no/browse/EZP-21853

## Description
The legacy kernel controller adds legacy's headers to the request . The problem is that it did not remove the existing values. 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