[wip] added serialized type

It fixes issue https://github.com/doctrine/mongodb-odm/issues/687

If it looks OK for you, I'll add tests.