Introduce macros for: setting the local capability flags from
crypto-algorithm closures; selecting a crypto algorithm based on the
capabilities reported by a peer site; and finding the local closure
based on the peer's algorithm decision.
This will make introducing new kinds of negotiation much less painful.
No functional change.
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>