Add missing tree.h on windows and use STATIC_EXPORT in bit vector (see #4937)

Both changes are required for making julia.h usable under MSVC.
This basically fixes #4937.

Will copying tree.h into the installation include dir automatically put the file into the windows installer?