CXX-55 Enforce symbol visibility when building shared objects

This sets things up so that the static library is not built with visibility attributes applied, but the shared library is. Since the objects are now built with different flags, we need to patch up the windows build to build the second set of objects with a different suffix.

It also fixes up two missing visibility attributes.

@andy10gen would appreciate your thoughts on this one.