Fix how we're handling the metadata/counter field in DynamoDB

If a model had the primary_key-attribute on a field other than "id" the dynamodb-adapter would run into an infinite loop and crash.