Add native and generic representation for filesystem::path format spec
Hi, 
First time contributor here. This fixes #3715 by adding a "type" format spec to the formatter of std::filesystem::path to allow either native or generic format of the path. Added tests as well. 
Please let me know if there's anything to fix. Thanks 
{"label": "fmtlib:master", "ref": "master", "sha": "5cfd28d476c6859617878f951931b8ce7d36b9df"}
Why
-----
Need a way to include the paths with only slashes rather than backslashes in the output in a cross-platform manner. This can be done by introducing  _`type`_ in format-spec for `path`.

How to use the proposed feature
-------------
On Windows,

```cpp
std::filesystem::path filename = R"(C:\Users\zhihaoy\.cache)";
print("|{}|", filename);  // prints |C:\Users\zhihaoy\.cache|
print("|{:n}|", filename);  // prints `.native()` |C:\Users\zhihaoy\.cache|
print("|{:g}|", filename);  // prints `.generic_wstring()` |C:/Users/zhihaoy/.cache|
```
On POSIX, the last line prints `.generic_string()`.

Support both generic and native format of std::filesystem::path
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 4799df1a317d..7b92cea5bf14 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -114,6 +114,7 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
   format_specs<Char> specs_;
   detail::arg_ref<Char> width_ref_;
   bool debug_ = false;
+  char path_type_ = 'n';
 
  public:
   FMT_CONSTEXPR void set_debug_format(bool set = true) { debug_ = set; }
@@ -130,20 +131,30 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
       debug_ = true;
       ++it;
     }
+    if (it != end && (*it == 'g' || *it == 'n')) { 
+      path_type_ = *it++;
+    }
     return it;
   }
 
   template <typename FormatContext>
   auto format(const std::filesystem::path& p, FormatContext& ctx) const {
     auto specs = specs_;
+    auto path_type = path_type_;
+  # ifdef _WIN32 
+    auto path_string = path_type == 'n' ? p.native() : p.generic_wstring();    
+  # else 
+    auto path_string = path_type == 'n' ? p.native() : p.generic_string();
+  # endif
+
     detail::handle_dynamic_spec<detail::width_checker>(specs.width, width_ref_,
                                                        ctx);
     if (!debug_) {
-      auto s = detail::get_path_string<Char>(p, p.native());
+      auto s = detail::get_path_string<Char>(p, path_string);
       return detail::write(ctx.out(), basic_string_view<Char>(s), specs);
     }
     auto quoted = basic_memory_buffer<Char>();
-    detail::write_escaped_path(quoted, p, p.native());
+    detail::write_escaped_path(quoted, p, path_string);
     return detail::write(ctx.out(),
                          basic_string_view<Char>(quoted.data(), quoted.size()),
                          specs);

diff --git a/test/std-test.cc b/test/std-test.cc
index dc1073b58fc8..7a81aaf9a5f5 100644
--- a/test/std-test.cc
+++ b/test/std-test.cc
@@ -25,15 +25,20 @@ TEST(std_test, path) {
 
   EXPECT_EQ(fmt::format("{}", path("foo\"bar")), "foo\"bar");
   EXPECT_EQ(fmt::format("{:?}", path("foo\"bar")), "\"foo\\\"bar\"");
+  
+  EXPECT_EQ(fmt::format("{:n}", path("/usr/bin")), "/usr/bin");
+  EXPECT_EQ(fmt::format("{:g}", path("/usr/bin")), "/usr/bin");
+# ifdef _WIN32
+  EXPECT_EQ(fmt::format("{:n}", path("C:\\foo")), "C:\\foo");
+  EXPECT_EQ(fmt::format("{:g}", path("C:\\foo")), "C:/foo");
 
-#  ifdef _WIN32
   EXPECT_EQ(fmt::format("{}", path(
                                   L"\x0428\x0447\x0443\x0447\x044B\x043D\x0448"
                                   L"\x0447\x044B\x043D\x0430")),
             "Шчучыншчына");
   EXPECT_EQ(fmt::format("{}", path(L"\xd800")), "�");
   EXPECT_EQ(fmt::format("{:?}", path(L"\xd800")), "\"\\ud800\"");
-#  endif
+# endif
 }
 
 // Test ambiguity problem described in #2954.

{"std-test": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"compile-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "ostream-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "ranges-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "core-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "scan-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "color-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "chrono-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "format-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "gtest-extra-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "args-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "compile-fp-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "unicode-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "assert-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "posix-mock-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "printf-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "enforce-checks-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "format-impl-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "os-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "xchar-test": {"run": "PASS", "test": "PASS", "fix": "PASS"}}
{"std-test": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"passed_count": 20, "failed_count": 0, "skipped_count": 0, "passed_tests": ["compile-test", "core-test", "chrono-test", "gtest-extra-test", "compile-fp-test", "unicode-test", "assert-test", "enforce-checks-test", "format-impl-test", "os-test", "xchar-test", "ostream-test", "ranges-test", "std-test", "scan-test", "color-test", "format-test", "args-test", "posix-mock-test", "printf-test"], "failed_tests": [], "skipped_tests": []}
{"passed_count": 19, "failed_count": 0, "skipped_count": 0, "passed_tests": ["compile-test", "core-test", "chrono-test", "gtest-extra-test", "compile-fp-test", "unicode-test", "assert-test", "enforce-checks-test", "format-impl-test", "os-test", "xchar-test", "ostream-test", "ranges-test", "scan-test", "color-test", "format-test", "args-test", "posix-mock-test", "printf-test"], "failed_tests": [], "skipped_tests": []}
{"passed_count": 20, "failed_count": 0, "skipped_count": 0, "passed_tests": ["compile-test", "core-test", "chrono-test", "gtest-extra-test", "compile-fp-test", "unicode-test", "assert-test", "enforce-checks-test", "format-impl-test", "os-test", "xchar-test", "ostream-test", "ranges-test", "std-test", "scan-test", "color-test", "format-test", "args-test", "posix-mock-test", "printf-test"], "failed_tests": [], "skipped_tests": []}