Move default destructors back into the header.

As filesystem plugins only need the interface, we would get into linking errors
if the destructors are not found in the object file. Moving them here prevents
these linker errors.

Part of work for modular filesystem plugins. For more details, consult the RFC at
https://github.com/tensorflow/community/blob/master/rfcs/20190506-filesystem-plugin-modular-tensorflow.md

PiperOrigin-RevId: 279750735
Change-Id: I20b2c20278344827e0106f30872a9a82721803f9
diff --git a/tensorflow/core/platform/file_system.cc b/tensorflow/core/platform/file_system.cc
index e4343ef..58d14e3 100644
--- a/tensorflow/core/platform/file_system.cc
+++ b/tensorflow/core/platform/file_system.cc
@@ -29,8 +29,6 @@
 
 namespace tensorflow {
 
-FileSystem::~FileSystem() {}
-
 string FileSystem::TranslateName(const string& name) const {
   // If the name is empty, CleanPath returns "." which is incorrect and
   // we should return the empty path instead.
@@ -59,12 +57,6 @@
 
 void FileSystem::FlushCaches() {}
 
-RandomAccessFile::~RandomAccessFile() {}
-
-WritableFile::~WritableFile() {}
-
-FileSystemRegistry::~FileSystemRegistry() {}
-
 bool FileSystem::FilesExist(const std::vector<string>& files,
                             std::vector<Status>* status) {
   bool result = true;
diff --git a/tensorflow/core/platform/file_system.h b/tensorflow/core/platform/file_system.h
index fe9ec3e..ade98a1 100644
--- a/tensorflow/core/platform/file_system.h
+++ b/tensorflow/core/platform/file_system.h
@@ -230,14 +230,14 @@
 
   FileSystem() {}
 
-  virtual ~FileSystem();
+  virtual ~FileSystem() = default;
 };
 
 /// A file abstraction for randomly reading the contents of a file.
 class RandomAccessFile {
  public:
   RandomAccessFile() {}
-  virtual ~RandomAccessFile();
+  virtual ~RandomAccessFile() = default;
 
   /// \brief Returns the name of the file.
   ///
@@ -287,7 +287,7 @@
 class WritableFile {
  public:
   WritableFile() {}
-  virtual ~WritableFile();
+  virtual ~WritableFile() = default;
 
   /// \brief Append 'data' to the file.
   virtual tensorflow::Status Append(StringPiece data) = 0;
@@ -394,7 +394,7 @@
  public:
   typedef std::function<FileSystem*()> Factory;
 
-  virtual ~FileSystemRegistry();
+  virtual ~FileSystemRegistry() = default;
   virtual tensorflow::Status Register(const std::string& scheme,
                                       Factory factory) = 0;
   virtual tensorflow::Status Register(