when private link page of a need is visited or left, update unread event counts

set unread events by need count of the visited/left page need to 0
update the unread event by type count accordingly
add code into callback for close connection sent, see #113 for details
rename method for clarity
fix message detail view staying on screen when user toggles out its message type
fix bug with iterating over message types when counting down unread messages
fix bug with iterating over message types when counting down unread messages
enable sort and ordering in posts table (postbox page) and messages table (private link page)

in messages table smart-table approach is used
in posts table the pure angularjs approach is used (smart-table didn't work for some reason here)
Merge branch 'devel' into feat-postbox
fix bug when toggling conversation types