Coerce None consistently, depending on the dtype of the container.

Fixes #7939.
Merge pull request #7941 from ahlmss/set_item_to_none

API: Coerce None according to the dtype of the container