title: Upsert is not functioning in LiteDB
body: <p>I am trying to do something like this : </p>
  
  <pre><code>db = new LiteDatabase(@"albumdata.db");
  db_string = db.GetCollection&lt;StringPair&gt;("strings");
  db.Engine.EnsureIndex("strings", "a", true);
  
  db_string.Upsert(new StringPair("a", "1"));
  // this line throws this exception : LiteDB.LiteException: 'Cannot insert duplicate key in unique index 'a'. The duplicate value is '"a"'.'
  db_string.Upsert(new StringPair("a", "1"));
  </code></pre>
  
  <p>But as mentioned in code I receive this error : <strong>LiteDB.LiteException: 'Cannot insert duplicate key in unique index 'a'. The duplicate value is '"a"'.'</strong></p>
  
  <p>Isn't <strong>Upsert</strong> for <strong>insert or update</strong> if it exists?</p>