refs: implement simple transactions for the packed-refs file