slang: Improve handling of StringMapEntries.

In Slang::checkODR(), change a line that deletes an entry when it
fails to be inserted. There are two problems with this line:
  (1) Calling delete is wrong, since the entry is malloc'ed.
  (2) The line is unreachable.
Since the line is unreachable, replace it with an assert attesting to
this fact.

In RSContext::insertExportType(), the code properly cleans up an entry
that failed to be inserted with free(). However, given that malloc()
is not called anywhere in slang, this could be confusing. Use the
Destroy() member function instead.

Change-Id: Ifc0920a86bb010a89e93319a70a423d87fb97e3f
2 files changed