hs-v3: Refactor the descriptor cookie computation code

These functions have very very similar code for computing hs_desc_build_authorized_client() and decrypt_descriptor_cookie() for computing the keys for the client authorization.

We should refactor this and consolidate since they do the same work on both sides (client and service).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information