Refactor: attrd: make each client operation handler its own function
This is preparation for allowing attrd to handle queries, which
will need to be handled differently from other types of operations.
This also fixes a bug introduced in 7714443 (a hash loop was
iterated without being initialized first).