Build coremods on Windows, add general support to the cmake script for building modules consisting of multiple compilation units

Instead of special casing m_spanningtree create one project for each subdir in src/modules/ and src/coremods/
Check if Membership::GetPrefixChar() returns 0 before appending it to a string

Spotted by @barosl