Large number of test/product code fixes.

I had some errors in how I converted from using reference IDs to
reference names.  I wasn't correctly minting reference names that
ensured that records without reference names were placed at the end of
the list when sorting, and in other place I wasn't building an
ADAMContig when I needed to be.