* FEATURE: add "assigned:<name>" filter (in the /filter page)
The "assigned:<name>" filter was already available in the advanced
search but it wasn't in the /filter page.
This commit adds that filter allowing anyone to filter topics assigned
to either a specific user (using their username) or to a specific group
(using its name).
* DEV: use argument instead of instance variable
* SPEC: add spec for when the user can't assign
After a topic is closed, the assignment is not deleted but becomes
inactive. When this happened, it was not removed from the assignments
count or list.
Change `topic_id` to polymorphic approach (In the next step we will allow assigning to individual post)
`topic_id` column is still used for efficient display of assigned users on topic list (to avoid scanning posts)
Ability to assign groups.
To assign group, user must have a right to send a message to that group.
In addition, 2 jobs were introduced, - AssignNotification and UnassignNotification to inform interested users in the background about the new assignment.
This significantly reduces the amount of logic we need to carry in the discourse-assign plugin. One side effect is that I had to rename the 'q' parameter to 'search', so that it matches core's implementation.