Refactor the image parser to avoid generating badly formed image src's

Previously, a transclusion of a skinny image tiddler (ie one where the
body has yet to be loaded) would render a broken image.