title: Rebuild select2 options without losing current selection
body: <p>I have a select2 dropdown element in my application that gets filtered based on user input.</p>
  
  <p>To perform the filtering, I do the following:</p>
  
  <pre><code>$mySelect2Menu.empty();
  $.each(newData, function(ind, val) {
     $mySelect2Menu.append($('&lt;option&gt;&lt;/option&gt;').attr('value', val).text(val));
  });
  </code></pre>
  
  <p>As a consequence of this, however, subsequent calls to <code>$('#mySelect2Menu').val()</code> will return null.</p>
  
  <p>I'd like to be able to keep any selected values in the select2 after the menu options are repopulated.  What's the best way to go about doing this?</p>
  
  <p>As an important side note, for my particular use case, there is a guarantee that when the menu is repopulated, the user's current selection <strong>will</strong> be available in <code>newData</code>.</p>