ValueError and IndexError for pivot_table
I'v found two examples of pivot_table which unexpectedly fail but for different reasons:

``` python
NUM_ROWS = 51364452
NUM_INDEX = 34262015
NUM_COLUMNS = 1732
df = pd.DataFrame({'A' : np.random.randint(NUM_INDEX, size=NUM_ROWS), 
                   'B' : np.random.randint(NUM_COLUMNS, size=NUM_ROWS), 
                   'C' : np.random.randn(NUM_ROWS)})

df_pivoted = df.pivot_table(index='A', columns='B', values='C', margins=False)
```

Error:

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda\lib\site-packages\pandas\tools\pivot.py", line 117, in pivot_table
    table = agged.unstack(to_unstack)
  File "C:\Anaconda\lib\site-packages\pandas\core\frame.py", line 3605, in unstack
    return unstack(self, level)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 394, in unstack
    return _unstack_multiple(obj, level)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 294, in _unstack_multiple
    unstacked = dummy.unstack('__placeholder__')
  File "C:\Anaconda\lib\site-packages\pandas\core\frame.py", line 3605, in unstack
    return unstack(self, level)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 398, in unstack
    return _unstack_frame(obj, level)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 438, in _unstack_frame
    value_columns=obj.columns)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 98, in __init__
    self._make_selectors()
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 132, in _make_selectors
    mask = np.zeros(np.prod(self.full_shape), dtype=bool)
ValueError: negative dimensions are not allowed
```

Second example (I have just changed the input values):

``` python
NUM_ROWS = 5e7
NUM_INDEX = 3e7
NUM_COLUMNS = 2e3
df = pd.DataFrame({'A' : np.random.randint(NUM_INDEX, size=NUM_ROWS), 
                   'B' : np.random.randint(NUM_COLUMNS, size=NUM_ROWS), 
                   'C' : np.random.randn(NUM_ROWS)})

df_pivoted = df.pivot_table(index='A', columns='B', values='C', margins=False)
```

Error:

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda\lib\site-packages\pandas\tools\pivot.py", line 117, in pivot_table
    table = agged.unstack(to_unstack)
  File "C:\Anaconda\lib\site-packages\pandas\core\frame.py", line 3605, in unstack
    return unstack(self, level)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 394, in unstack
    return _unstack_multiple(obj, level)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 294, in _unstack_multiple
    unstacked = dummy.unstack('__placeholder__')
  File "C:\Anaconda\lib\site-packages\pandas\core\frame.py", line 3605, in unstack
    return unstack(self, level)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 398, in unstack
    return _unstack_frame(obj, level)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 438, in _unstack_frame
    value_columns=obj.columns)
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 98, in __init__
    self._make_selectors()
  File "C:\Anaconda\lib\site-packages\pandas\core\reshape.py", line 133, in _make_selectors
    mask.put(selector, True)
IndexError: index 1421936250 is out of bounds for axis 0 with size 1421935744
```

The example works fine if you reduce the input values.

```
pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.5.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 45 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None

pandas: 0.16.2
nose: 1.3.7
Cython: 0.22.1
numpy: 1.9.2
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 3.2.0
sphinx: 1.3.1
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.4
bottleneck: 1.0.0
tables: 3.2.0
numexpr: 2.4.3
matplotlib: 1.4.3
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 1.0.0
xlsxwriter: 0.7.3
lxml: 3.4.4
bs4: 4.3.2
html5lib: None
httplib2: 0.9
apiclient: None
sqlalchemy: 1.0.5
pymysql: None
psycopg2: None
```
