add opam file
swap util functions
don't force last cert in chain to self-sign
totality
reverse private parsed certificates

In pems, chains go top-down.
Merge pull request #137 from mirleft/opam

opam
Revert "reverse private parsed certificates"

This reverts commit 7043b666eb70ba605b44982316cb61a77e8b0451.
Merge pull request #138 from mirleft/fix-config-validation

Fix validation of own certificate stacks
select a supported protocol version and ciphersuite by random