Fix to_json ValueError and remove pandas pin
This PR fixes the root cause of the issue:
- #6197

This PR also removes the temporary pin of `pandas` introduced by:
- #6200


Note that for orient in ['records', 'values'], index value is ignored but
- in `pandas` < 2.1.0, a ValueError is raised if not index and orient not in ['split', 'table']
  - for orient = 'records', we need index = True
  - default index value is True
- in `pandas` = 2.1.0, a ValueError is raised if index is True and orient in ['records', 'values']
  - for orient = 'records', we need index = False or None
  - default index value is None

This PR fixes the issue by not passing index and thus using default index value (valid for all pandas versions), unless orient is 'split' or 'table' (where we pass index = False, as it was done before this fix).