MB-10521: dynamic_cast to static_cast conversion

Don't use dynamic_cast for classes extending the Stream class

Change-Id: I6f207fef7d7258c81c203543f5a8fd9310ec711e
Reviewed-on: http://review.couchbase.org/35026
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>