Some bug fixes

Hi,

I'm working with my team on a project with rails (4.1) and posgresql. We want to use CompositeType but AR don't support them natively then we found your gem. We want to work with it but there was a bug when we try to insert nested composite type. Playing with your gem we found a bug when using compositeType in where clause (tests were failed). Creation of nested object from array and hash should be interesting then we implement it too. Here is the pull request with all these changes.

Regards,

MOUTOT Alexandre
a.moutot@alphalink.fr