Add support for parsing common/alt names

This appears to follow both the specification and browser behaviour, but this should be double-checked before merge.

Pinging @mdawaffe for a review on this. Appears to follow both [the RFC](http://tools.ietf.org/html/rfc2818#section-3.1) and [Firefox's implementation](https://github.com/mozilla/mozilla-central/blob/f5d0ba7f4a53768c45c5894da28040951d2badb6/security/nss/lib/certdb/certdb.c#L1757).

Notably, doesn't support double wildcards (`*.*.x.com`), but I'm not sure that browsers support this any more. Google has [migrated away from it](https://groups.google.com/forum/#!topic/google-appengine/u2Tmtv8W6Bo) for App Engine, I believe due to browser support.