Remove a reference
the transaction
the reference to remove
0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code