Allow re-use of render method. Fixes to reference links for Links & Images.

There seemed to be definite issues with the rendering of images and links in relation to producing the reference list at the bottom of a Markdown document. This should fix the reference list.

I also made the render method reusable. Previously it would convert cfg.unsup_tags[] items to RegExp without checking if they already were generated causing an error and failure.