Add stream_results_optional
It's needed to properly read from storage.directory_get_entries, which returns None instead of empty iterators when a directory is not found (so clients can tell the difference with the empty directory without hardcoding its hash).
Migrated from D6047 (view on Phabricator)