Made email parser more correct.

Now it's based on RFC 822, though it still doesn't implement
quoted strings in email addresses.