Make subject RFC compliant

- [x] Encode nonascii subject into rfc-compliant string
- [x] Strip newline characters