added sort_key to attachments
allow property names with dots in them.
Reference: http://stackoverflow.com/questions/13631884/ndb-querying-a-genericproperty-in-repeated-expando-structuredproperty
added tests and code for broken references