Add .tobytes() method to categorical type
It would be nice to have this implemented so that a parallel apply using `dask` could be used on dataframes with `Categorical` type columns.

Right now if I try to use `Dask` for a parallelized apply like so:

``` python
import dask.dataframe as dd
df_test = pd.DataFrame({'id': ['a', 'a', 'a', 'b', 'b'],
                                        'cat': ['t','h','t','h','t']})
df_test['cat'] = df_test['cat'].astype('category')

df_test = dd.from_pandas(df_test, npartitions=20)
dd_result = df_test.groupby('id').apply(lambda x: (x['cat'] == 't').sum())
pd_result = dd_result.compute()
```

I get the following error:

``` python
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-19-3dadd485a741> in <module>()
      3 dfd = dd.from_pandas(df, npartitions=20)
      4 dd_result = dfd.groupby('item').apply(gen_will_nsf)  # or whatever
----> 5 pd_result = dd_result.compute()

/usr/local/lib/python2.7/dist-packages/dask/base.pyc in compute(self, **kwargs)
     35 
     36     def compute(self, **kwargs):
---> 37         return compute(self, **kwargs)[0]
     38 
     39     @classmethod

/usr/local/lib/python2.7/dist-packages/dask/base.pyc in compute(*args, **kwargs)
    108                 for opt, val in groups.items()])
    109     keys = [var._keys() for var in variables]
--> 110     results = get(dsk, keys, **kwargs)
    111 
    112     results_iter = iter(results)

/usr/local/lib/python2.7/dist-packages/dask/threaded.pyc in get(dsk, result, cache, num_workers, **kwargs)
     55     results = get_async(pool.apply_async, len(pool._pool), dsk, result,
     56                         cache=cache, queue=queue, get_id=_thread_get_id,
---> 57                         **kwargs)
     58 
     59     return results

/usr/local/lib/python2.7/dist-packages/dask/async.pyc in get_async(apply_async, num_workers, dsk, result, cache, queue, get_id, raise_on_exception, rerun_exceptions_locally, callbacks, **kwargs)
    479                 _execute_task(task, data)  # Re-execute locally
    480             else:
--> 481                 raise(remote_exception(res, tb))
    482         state['cache'][key] = res
    483         finish_task(dsk, key, state, results, keyorder.get)

AttributeError: 'Categorical' object has no attribute 'tobytes'

Traceback
---------
  File "/usr/local/lib/python2.7/dist-packages/dask/async.py", line 264, in execute_task
    result = _execute_task(task, data)
  File "/usr/local/lib/python2.7/dist-packages/dask/async.py", line 246, in _execute_task
    return func(*args2)
  File "/usr/local/lib/python2.7/dist-packages/dask/dataframe/shuffle.py", line 256, in partition
    p.append(d)
  File "/usr/local/lib/python2.7/dist-packages/partd/encode.py", line 23, in append
    data = valmap(self.encode, data)
  File "/usr/local/lib/python2.7/dist-packages/toolz/dicttoolz.py", line 84, in valmap
    rv.update(zip(iterkeys(d), map(func, itervalues(d))))
  File "/usr/local/lib/python2.7/dist-packages/partd/pandas.py", line 108, in serialize
    for block in blocks]  # this can be slightly faster if we merge both operations
  File "/usr/local/lib/python2.7/dist-packages/partd/numpy.py", line 101, in serialize
    return x.tobytes()
```
## INSTALLED VERSIONS

commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-76-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.18.0
nose: 1.3.1
pip: 8.1.1
setuptools: 19.1.1
Cython: 0.23.4
numpy: 1.10.2
scipy: 0.16.1
statsmodels: 0.6.1
xarray: None
IPython: 4.0.2
sphinx: 1.2.2
patsy: 0.4.1
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: 1.0.0
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: 0.7.5
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
