ReceivePackHandler: only compute sorted refs if they will be used.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>