Implement ssl_pending() for NSS. This fixes bug #368 which so far only affected OpenSSL. Submitted by Ricky Zhou.