Drop socket reference on close.

Closes #1976
- Prevent the unbounded memory growth caused by maintaining
  a reference to the socket object that is created on every connection.
Merge pull request #4430 from jaswilli/leak

Drop socket reference on close.
full BREAD Tag endpoints and Tag api tests

close #4263
- implemented full BREAD Tag API
- deleting a tag will also detach its relations to posts
- tests of Tag API