BUG: bug in json lib when frame has length zero
closes https://github.com/pydata/pandas/issues/9781

on master:

```
>>> df = DataFrame(columns=['jim', 'joe'])
>>> df
Empty DataFrame
Columns: [jim, joe]
Index: []
>>> df.to_json()
'{}'
```

mixed type will segfault:

```
>>> df['joe'] = df['joe'].astype('i8')
>>> df.to_json()
Segmentation fault (core dumped)
```

on branch:

```
>>> df.to_json()
'{"jim":{},"joe":{}}'
>>> df['joe'] = df['joe'].astype('i8')
>>> read_json(df.to_json())
Empty DataFrame
Columns: [jim, joe]
Index: []
```
