Change the timing of data type cast

Data type cast is changed to only happen when reading data out and
writing data to Ryu's built-in components (dpset, event, sendmsg,
etc).  This way, ZooKeeper data read/write deal only with
str. Hopefully this can make future coding easier.