cmake: add ENABLE_SHARED cmake option, default to ON

Allow MSVC users to opt-out; to roughly halve the compile time.  Clean up a few
nits in the process.