Update markdown reference to external issues

1. Issue may be not only in jira.
2. Rewrite method for support different external issue trackers
Update markdown.rb

Fix mistake by @qqshfox report
fix link_to by @bwrsandman

Add missing '#'
Merge pull request #7147 from zzet/patch-12

Update markdown reference to external issues