Changed reference to observed NSManagedObjectContexts to NSHashTable for weak referencing.
Fixed attachment storage by switching to native CBLAttachment instead of base64 storage.