receive-pack: don't pass non-existent refs to post-{receive,update} hooks