DataFrame.to_panel() method throws MemoryError when number of rows per item varies greatly
Ipython 64, pandas installed with pip, 16 gb ram with sizable swap.

The following seems to replicate the issue I have with my data:

``` python
import pandas as pd
import numpy as np
pdf = pd.DataFrame(np.random.rand(600000,25), columns = list('abcdefghijklmnopqrstuvwxy'))
sample=np.random.rand(900)
for i in range(100):
    pdf['a'][np.random.randint(0,600000)]=np.random.choice(sample)
pdf=pdf.set_index(['a','b'])
p=pdf.to_panel()
```

throws:

``` python

MemoryError                               Traceback (most recent call last)
<ipython-input-120-f97286b2b93a> in <module>()
----> 1 p=pdf.to_panel()

/home/user1/.pyenv/versions/theano/lib/python2.7/site-packages/pandas/core/frame.pyc in to_panel(self)
   1051             newb = block2d_to_blocknd(block.values.T, block.items, shape,
   1052                                       [major_labels, minor_labels],
-> 1053                                       ref_items=selfsorted.columns)
   1054             new_blocks.append(newb)
   1055 

/home/user1/.pyenv/versions/theano/lib/python2.7/site-packages/pandas/core/reshape.pyc in block2d_to_blocknd(values, items, shape, labels, ref_items)
   1034     # labels, for converting to panel format.
   1035     selector = factor_indexer(shape[1:], labels)
-> 1036     mask = np.zeros(np.prod(shape), dtype=bool)
   1037     mask.put(selector, True)
   1038 

MemoryError: 
```
