Extensions checks.

Checks whether certificate has all extensions required/prohibited based on BRs with correct criticality. Also added small is_self_signed method to certificate, so we can tell whether the certificate is root or not.
Do you usually do that in Python...? I can change argument name from reason to oid, so it's more obvious.