Introduce RSInfo and its reader/extractor/writer.

This commit only adds files that implements RSInfo class and DOES
NOT switch to use it.

RSInfo defines the new file format to cache the metadata and
RS-specific information from the source bitcode.

It's the replacement of the old "MC cache" whose name is ambiguous
and some fields within that are deprecated after legacy JIT was
removed.

Reader of RSInfo reads information from the file we called "RS info
file." It will replace MCCacheReader.

Extractor of RSInfo extracts information from the metadata section of
the source bitcode. It will replace MetadataExtractor.

Writer of RSInfo serializes a RSInfo object to a file such that
we can load it quickly using RSInfo reader later. It will replace
MCCacheWriter.

RSInfo unifies the interfaces to get the RS-specific information
such as #rs_export_var supplied by the developers either from file
(RS info file) or from the source bitcode. Later commit will prove
that.

RSInfo uses signature ("\0rsinfo\n") which is different from the
old MC cache ("\0bcc").

The version (MCO_VERSION in bcc_mccache.h) is increased by 1 in this
commit since we remove res_type in MCO_Dependency. RSInfo inherits
the version number comes from old MC cache therefore its version
number starts with 3.
diff --git a/lib/ExecutionEngine/RSScript.h b/lib/ExecutionEngine/RSScript.h
index 6e4cd9f..50a3eb3 100644
--- a/lib/ExecutionEngine/RSScript.h
+++ b/lib/ExecutionEngine/RSScript.h
@@ -38,6 +38,7 @@
 }
 
 namespace bcc {
+  class RSInfo;
   class ScriptCompiled;
   class ScriptCached;
   class Source;
@@ -64,18 +65,13 @@
   public:
     class SourceDependency {
     private:
-      MCO_ResourceType mSourceType;
       std::string mSourceName;
       uint8_t mSHA1[20];
 
     public:
-      SourceDependency(MCO_ResourceType pSourceType,
-                       const std::string &pSourceName,
+      SourceDependency(const std::string &pSourceName,
                        const uint8_t *pSHA1);
 
-      inline MCO_ResourceType getSourceType() const
-      { return mSourceType; }
-
       inline const std::string &getSourceName() const
       { return mSourceName; }
 
@@ -113,6 +109,8 @@
 
     llvm::SmallVector<SourceDependency *, 4> mSourceDependencies;
 
+    const RSInfo *mInfo;
+
     // External Function List
     std::vector<char const *> mUserDefinedExternalSymbols;
 
@@ -134,13 +132,19 @@
     // Add dependency information for this script given the source named
     // pSourceName. pSHA1 is the SHA-1 checksum of the given source. Return
     // false on error.
-    bool addSourceDependency(MCO_ResourceType pSourceType,
-                             const std::string &pSourceName,
+    bool addSourceDependency(const std::string &pSourceName,
                              const uint8_t *pSHA1);
 
     const SourceDependencyListTy &getSourceDependencies() const
     { return mSourceDependencies; }
 
+    // Set the associated RSInfo of the script.
+    void setInfo(const RSInfo *pInfo)
+    { mInfo = pInfo; }
+
+    const RSInfo *getInfo() const
+    { return mInfo; }
+
     void markExternalSymbol(char const *name) {
       mUserDefinedExternalSymbols.push_back(name);
     }