Fix data schema

Fixed interrelationships between server-side models.
- Results and Queries now have a many-to-many relationship.
- Results and Interactions now have the correct many-to-one relationship.