Fixed NaN issue in bokeh-server, closes #231.

OK, this takes me some time, but it seems to be solved.

I took some of the code from @paddy's pandas rest, but I modified it a little bit to make more modular and to pass `float('nan')` instead of the `None`, because if we pass `None` to the `jsonencoder`, it is translated to `null`, and `null` seems to not represent a NaN value properly, check this images, ie:
* Using `None` (`null` in json):
![1](https://f.cloud.github.com/assets/1640669/2416834/953d6c6e-ab0d-11e3-9b15-9236f3d56fcf.png)

* Using `float('nan')` (`'NaN'` in json):
![2](https://f.cloud.github.com/assets/1640669/2416839/a571df70-ab0d-11e3-9d0f-e0f69704563a.png)

This PR seems to fix the issue when you use numpy.array and pandas.series.