text: Title: Refactoring: split `tools.py` into libs
  Body: `tools.py` has 2877 lines. We need to review the functions and:
  * group functions by topics in `xonsh.lib`
  * move functions to `xonsh.platforms` e.g. `hardcode_colors_for_win10`, `WIN10_COLOR_MAP`, `_win_bold_color_map`, etc
  
  ## For community
  ⬇️  **Please click the 👍 reaction instead of leaving a `+1` or 👍  comment**
  