db: show a many-to-many relationship

We want a many-to-many relationship between threads and labels. Since
gorp doesn't support foreign keys, we need to create the relationship
table ourselves and take it from there.