Check unread count before submitting mark-all-as-read request, prevent JS error msg

If all messages are already read and you click "mark as read" you get a JS error dialog because of a PHP error which occurs when there are zero IDs in the POST request. 

This pull request simply returns from the function without making the AJAX call if there are no IDs in the request.