Modifications to history_contents API and client consumption...

... to reflect the fact that history can now contain two kinds of objects with potentially overlapping ids.
Fix UI bug when collections and datasets in same history have same id.