updated scholmd figure parsing code for scholdoc-type bc7277ca

major refactor and cleanup of the figure parsing code in Readers/Markdown.hs