tor-proto: Refactor the key derivation
This commit refactors the key derivation, by applying the following:
- The spaghetti slice creation with the hard-to-read boundaries got replaced by a closure, which accepts a length, advances the seed slice by n bytes as a side-effect, and returns the just advanced bytes
- The use of
.exceptgot replaced by an.or, with the use of the already existingInvalidKDFOutputLengtherror, thereby removing a potential panic (probably not reachable in runtime though) - The conversion from a slice to a
CircuitBindinggot moved into aTryFromtrait of the appropriate data structure