Make test_logical_decoding and logicalfuncs.c share xlogreader code