Minor fixes

- Use explicit null checks
- Throw \RuntimeException instead of \BadMethodCallExcepion in EcDH
- Fix bug where generated private key secrets could be 0
- Add (some) doc comments