Enforce `max_memory` for device_map strategies
# What does this PR do?

In #22271, by removing the `max_memory` from the kwargs before it gets passed to `get_balanced_memory`, I effectively made the `max_memory` argument ignored when `device_map` is `"auto"`, `"balanced"` or `"balanced_low_0"` (as was caught in the multi-GPU tests). This PR fixes that.
_The documentation is not available anymore as the PR was closed or merged._