Refcounted SSL stream goes out of scope - fixes #846

Error occurs when requesting a page in the https_server example