Add platform attribute to cartridge serialization and fixed tests

Platform attribute was not being serialized to MongoDB.