MFC r347266: Implement get and set nic state as global functions in mlx5core.
Sponsored by: Mellanox Technologies