add typed object codec feature

Hi,

I have added typed object codec feature;

1. typed tables with key __class are encoded as typed object
2. typed object are decoded as typed tables with key __class