scibin/imfitsource: quasi-new, derived from copl:imsrcdebug

A few changes here and there but largely unchanged, so hopefully this
works robustly.