API Change: set_email is gone, constructor change

Allow extensions and subject attributes in constructor.
Remove set_email (name also set CN and was misleading).
Move test at end of file to doctest.
Factor binary data used for tests into test.py.