title: Mongodb update() with $unset/$pull not doing $pull
body: <p>I am trying to remove some items from an array in a document in MongoDB:</p>
  
  <pre><code>doc1
    items
      item
         id=1
      item
         id=2
      item
         id=3
  doc2
    items
      item
        id=4
      item
        id=5
      item
        id=6
  </code></pre>
  
  <p>I use this to remove for example item id=5:</p>
  
  <pre><code>(...)
  updateItems({'items.id': 5},    { $unset: { 'items.$': 1 }},    { $pull: {'items'    : null} });
  (...)
  function updateItems(objmatch, objunset, objpull){  
  coremodels.getProfileTable(req).update(
      objmatch, 
      objunset,
      {multi: true}, function(err) {
          coremodels.getProfileTable(req).update(
                          objmatch, 
                          objpull,
                          {multi: true}, function(err) {
          console.log('COMPLETED');
  });
  (...)                       
  </code></pre>
  
  <p>The $unset works fine, but the $pull doesn't seem to be working. The end result of this operation is an empty (Null) item 5.</p>
  
  <p>Any ideas why the $pull is not removing the empty document?</p>
  
  <p>Many thanks in advance.</p>