SSL: Moved configuration of version restrictions to the context.

The minimum and maximum accepted SSL/TLS versions are now
configured by setting the corresponding variables in the
context object.

This is in line with how other SSL parameters are configured.
Some consts
Revert the BitString cast support. Make set_length return the object.
Fix testcase, now that we generate the correct flags (verified with openssl x509 -inform -text)
Small simplification.
Added possibly working basic constraints check to verify_certificate_chain. Next step is probably to figure out want the API ought to look like...