server: Simplify afs socket cookie code.