title: dcast fails to cast character column when the data size is large
body: <p>I'm using the <code>dcast</code> function in the  <code>library(reshape2)</code> package to cast a simple table of three columns </p>
  
  <pre><code>df = data.table(id  = 1:1e6, 
               var = c('continent','subcontinent',...), 
               val = c('America','Caribbean',...)````
  </code></pre>
  
  <p>by <code>dcast(df, id ~ var, value.var ='val')</code> and it automatically converts the value to the count, i.e. </p>
  
  <pre><code>id     continent   subcontinent
   1     1           1
   2     1           1
  </code></pre>
  
  <p>However, if I reduce the size to 10000 rows, it correctly outputs</p>
  
  <pre><code>id     continent   subcontinent
   1     America     Caribbean
   2     Europe      West Europe
  </code></pre>
  
  <p>Is this a bug or I need to change the code somehow? Please help. Thanks!</p>