Fix unread discussions count (on course front page)

Translated token "hasunreadposts" used to show the unread discussion count, but not anymore.

While adding the "unread discussion count" as a parameter to the token, I noticed forumfields->numunreaddiscussions does not properly hold the actual number of discussions that has new posts in them.

So here is a suggested fix for get_num_unread_discussions() which does not seem to work properly when using it to view unread (post) discussions on the course front page. 

I use it together with:
get_string('hasunreadposts', 'forumng', $forums[$cm->instance]->get_num_unread_discussions());

$string['hasunreadposts'] = '({$a} Unread posts)';

What do you think?