renderComment will enhance public bug links for both plaintext
and markdown comments, but, it doesn't do the same for private bugs
even if the user can see it (since it doesn't use the logged in user).
In addition, renderComment is unable to enhance markdown links that
may point to the current bmo instance (since the markdown isn't rendered
at the time renderComment does link enhancement).
This commit adds some client side code that will fetch extra data for
any private or otherwise un-enhanced links on the show bug page. When
fetching it uses the current user, so if they are able to view a private
bug it will be enhanced.
This works for attachments too.
The overall overhead of this code is very small since it only works upon
private/unenhanced links and it limits the api responses by specifiying
the exact data required. In total it adds about 2 API requests to each
show bug page and the initial render time of the page stays about the
same.