Reject 0-size files in both prepare and upload
Unify HasId/TableRowId and IntId equality logic

Eliminate various .unId uses, which I believe is now safe, though I'm
still not exactly sure about this.  This was initially to be a more
ambitious change introducing RowRef, but I decided there was no point.