Support date partitioning with JSON data.

Commit message says it all.

I also updated the Thrift code to support fields other than `timestamp`.

CC @pgarbacki @andykram
Would you mind writing a unit test for this logic? The thrift parser is tested indirectly in the end-to-end test but I should add a unit test for that piece as well.