X509 interfaces

Replaces #1267.

**Update: simplified interfaces so the below questions are irrelevant until we expand them in future PRs**

Two outstanding questions:

- Do we want to blow up when an X509Name has multiple identical OIDs in a single Name?
- Do we want to blow up when an X509Certificate has multiple extensions with the same OID?

These are both things you Should Not Do™, but since it's all ASN.1 under the hood nothing technically prohibits the existence of certificates and names that do this.

A bit more detail than is in the PR:

- `version` will return an enum object that will correspond to v1 or v3. Leaving it an integer is a mistake many other APIs have made to their sorrow.

I've decided to go down the path of keeping the interface small and having `get_extension` and `get_item`. When the requested OID is not available we will raise the exceptions that are added here.
Yeah, `enum34` should be fine. I think we want to use:

```py
class X509Version(Enum):
    v1 = 0
    v2 = 1
    v3 = 2
```

though.

On Tue Nov 25 2014 at 9:55:48 AM Paul Kehrer <notifications@github.com>
wrote:

> In docs/hazmat/primitives/interfaces.rst:
>
> > +
> > +        The public key associated with the certificate.
> > +
> > +    .. attribute:: not_before
> > +
> > +        :type: :class:`datetime.datetime`
> > +
> > +    A naïve datetime representing the beginning of the validity period for the
> > +    certificate in UTC. This value is inclusive.
> > +
> > +    .. attribute:: not_after
> > +
> > +        :type: :class:`datetime.datetime`
> > +
> > +    A naïve datetime representing the end of the validity period for the
> > +    certificate in UTC. This value is inclusive.
>
> Returning version using an enum? Something like:
>
> class X509Versions(Enum):
>     v1 = object()
>     v3 = object()
>
> We'll have to add enum34 to our dependencies if we go that route, but I
> don't know if that matters. Presumably pyasn1 will become a requirement for
> us shortly as well.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pyca/cryptography/pull/1442/files#r20880940>.
>