title: Option groups in symfony2 entity form type
body: <p>Is there any way an entity field can be shown grouped in option groups in symfony2 (v.2.1), for example I have something like this in my form class:</p>
  
  <pre><code>$builder-&gt;add('account',
                      'entity',
                      array(
                          'class' =&gt; 'MyBundle\Entity\Account',
                          'query_builder' =&gt; function(EntityRepository $repo){
                              return $repo-&gt;findAllAccounts();
                          },
                          'required'  =&gt; true,
                          'empty_value' =&gt; 'Choose_an_account',
                      );
  </code></pre>
  
  <p>But (of course) they are displayed as the repository class reads it from the db and I would like to display them grouped in the combobox. This <a href="https://stackoverflow.com/a/10403249/115193">post</a> mentions that featured added to the 2.2 release out of the box, but what options do we 2.1 users have?</p>
  
  <p>The Grouping would be based on a field called <code>Type</code>, lets say I have a getter for that called <code>getType()</code> in my Account entity that returns a string.</p>
  
  <p>Thanks.</p>