builtin-fsck: move common object checking code to fsck.c